| utf8-package {utf8} | R Documentation |
The utf8 Package
Description
UTF-8 Text Processing
Details
Functions for manipulating and printing UTF-8 encoded text:
-
as_utf8attempts to convert character data to UTF-8, throwing an error if the data is invalid; -
utf8_validtests whether character data is valid according to its declared encoding; -
utf8_normalizeconverts text to Unicode composed normal form (NFC), optionally applying case-folding and compatibility maps; -
utf8_encodeencodes a character string, escaping all control characters, so that it can be safely printed to the screen; -
utf8_formatformats a character vector by truncating to a specified character width limit or by left, right, or center justifying; -
utf8_printprints UTF-8 character data to the screen; -
utf8_widthmeasures the display width of UTF-8 character strings (many emoji and East Asian characters are twice as wide as other characters); -
output_ansiandoutput_utf8test for the output connections capabilities.
For a complete list of functions, use library(help = "utf8").
Author(s)
Patrick O. Perry