View source: R/file.encoding.R
| file.encoding | R Documentation | 
Examine file encoding.
file.encoding(file)
| file | a filename. | 
"latin1", "UTF-8", "unknown", or NA.
This function requires the file shell command to be in the path.
Otherwise, this function returns NA.
The encoding "unknown" indicates that the file is an ASCII text file
or a binary file.
In TAF, text files that have non-ASCII characters should be encoded as UTF-8.
If this function fails in Windows, the guess_encoding function in the
readr package may help.
Encoding examines the encoding of a string.
latin1.to.utf8 converts files from latin1 to
UTF-8 encoding.
line.endings examines line endings.
TAF-package gives an overview of the package.
## Not run: 
file.base <- system.file(package="base", "DESCRIPTION")
file.nlme <- system.file(package="nlme", "DESCRIPTION")
file.encoding(file.base)  # ASCII
file.encoding(file.nlme)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.