Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

utf8-package

The utf8 Package


Description

UTF-8 Text Processing

Details

Functions for manipulating and printing UTF-8 encoded text:

  • as_utf8 attempts to convert character data to UTF-8, throwing an error if the data is invalid;

  • utf8_valid tests whether character data is valid according to its declared encoding;

  • utf8_normalize converts text to Unicode composed normal form (NFC), optionally applying case-folding and compatibility maps;

  • utf8_encode encodes a character string, escaping all control characters, so that it can be safely printed to the screen;

  • utf8_format formats a character vector by truncating to a specified character width limit or by left, right, or center justifying;

  • utf8_print prints UTF-8 character data to the screen;

  • utf8_width measures the display width of UTF-8 character strings (many emoji and East Asian characters are twice as wide as other characters);

  • output_ansi and output_utf8 test for the output connections capabilities.

For a complete list of functions, use library(help = "utf8").

Author(s)

Patrick O. Perry


utf8

Unicode Text Processing

v1.2.1
Apache License (== 2.0) | file LICENSE
Authors
Patrick O. Perry [aut, cph], Kirill Müller [cre], Unicode, Inc. [cph, dtc] (Unicode Character Database)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.