EVOLUTION-MANAGER
Edit File: read_utf8.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Read / write files encoded in UTF-8</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for read_utf8 {xfun}"><tr><td>read_utf8 {xfun}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Read / write files encoded in UTF-8</h2> <h3>Description</h3> <p>Read or write files, assuming they are encoded in UTF-8. <code>read_utf8()</code> is roughly <code>readLines(encoding = 'UTF-8')</code> (a warning will be issued if non-UTF8 lines are found), and <code>write_utf8()</code> calls <code>writeLines(enc2utf8(text), useBytes = TRUE)</code>. </p> <h3>Usage</h3> <pre> read_utf8(con, error = FALSE) write_utf8(text, con, ...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>con</code></td> <td> <p>A connection or a file path.</p> </td></tr> <tr valign="top"><td><code>error</code></td> <td> <p>Whether to signal an error when non-UTF8 characters are detected (if <code>FALSE</code>, only a warning message is issued).</p> </td></tr> <tr valign="top"><td><code>text</code></td> <td> <p>A character vector (will be converted to UTF-8 via <code><a href="../../base/html/Encoding.html">enc2utf8</a>()</code>).</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>Other arguments passed to <code><a href="../../base/html/writeLines.html">writeLines</a>()</code> (except <code>useBytes</code>, which is <code>TRUE</code> in <code>write_utf8()</code>).</p> </td></tr> </table> <hr /><div style="text-align: center;">[Package <em>xfun</em> version 0.16 <a href="00Index.html">Index</a>]</div> </body></html>