Convert to or from UTF-8-encoded Character Vectors
转换或从UTF-8编码字符向量
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Conversion of UTF-8 encoded character vectors to and from integer vectors.
转换的UTF-8编码字符向量和整数向量。
用法----------Usage----------
utf8ToInt(x)
intToUtf8(x, multiple = FALSE)
参数----------Arguments----------
参数:x
object to be converted.
要转换的反对。
参数:multiple
logical: should the conversion be to a single character string or multiple individual characters?
逻辑:转换应该是一个字符串或多个单个字符?
Details
详情----------Details----------
These will work in any locale, including on machines that do not otherwise support multi-byte character sets.
这些工作在任何区域,包括机器上,否则不支持多字节字符集。
值----------Value----------
utf8ToInt converts a length-one character string encoded in UTF-8 to an integer vector of (numeric) UTF-8 code points.
utf8ToInt转换长度字符串在UTF-8编码(数字)UTF-8代码点整数向量。
intToUtf8 converts a vector of (numeric) UTF-8 code points either to a single character string or a character vector of single characters. (For a single character string 0 is silently omitted: otherwise 0 is mapped to "". Non-integral numeric values are truncated to integers.) The Encoding is declared as "UTF-8".
intToUtf8(数字)UTF-8代码点或者一个字符串或单个字符的字符向量的向量转换。 (对于一个字符串0默默省略,否则0""非整数值将被截断为整数。)Encoding,被宣布为被映射到"UTF-8"。
As from R 2.11.0 NA inputs are mapped to NA output.
从ŕ2.11.0NANA输出输入映射。
举例----------Examples----------
## will only display in some locales and fonts[#将只显示在某些区域设置和字体]
intToUtf8(0x03B2L) # Greek beta[希腊公测]