iconv - Convert Character Vector between Encodings
来源:互联网 发布:北京凶宅数据库名单 编辑:程序博客网 时间:2024/05/17 22:11
----------------------------------------------------------
iconv(x, from = "", to = "", sub = NA, mark = TRUE, toRaw = FALSE)
iconvlist()
Examples
## In principle, not all systems have iconvlist
try(utils::head(iconvlist(), n = 50))
## Not run:
## convert from Latin-2 to UTF-8: two of the glibc iconv variants.
iconv(x, "ISO_8859-2", "UTF-8")
iconv(x, "LATIN2", "UTF-8")
## End(Not run)
## Both x below are in latin1 and will only display correctly in a
## locale that can represent and display latin1.
x <- "fa\xE7ile"
Encoding(x) <- "latin1"
x
charToRaw(xx <- iconv(x, "latin1", "UTF-8"))
xx
iconv(x, "latin1", "ASCII") # NA
iconv(x, "latin1", "ASCII", "?") # "fa?ile"
iconv(x, "latin1", "ASCII", "") # "faile"
iconv(x, "latin1", "ASCII", "byte") # "fa<e7>ile"
## Extracts from old R help files (they are nowadays in UTF-8)
x <- c("Ekstr\xf8m", "J\xf6reskog", "bi\xdfchen Z\xfcrcher")
Encoding(x) <- "latin1"
x
try(iconv(x, "latin1", "ASCII//TRANSLIT")) # platform-dependent
iconv(x, "latin1", "ASCII", sub = "byte")
## and for Windows' 'Unicode'
str(xx <- iconv(x, "latin1", "UTF-16LE", toRaw = TRUE))
iconv(xx, "UTF-16LE", "UTF-8")
- iconv - Convert Character Vector between Encodings
- Character Encodings
- Convert Character between Upper and Lower
- Convert Between ASCII Code and Character in Commandline
- Character Encodings For Modern Programmers
- windows VIA C/C++ 之 Character Encodings
- can’t convert between vector values of different size return (__m64) __builtin_ia32_vec_init_v2si
- 转换字符编码(Converting Between String Encodings)CFString
- iconv() [function.iconv]: detected an illegal character in input string
- Introducing Character Sets and Encodings(字符集与编码介绍)
- incompatible character encodings: UTF-8 and ASCII-8BIT
- PHP错误:iconv() Detected an illegal character
- convert between characters and values
- convert between RGB565 and RGB888
- Differences between ArrayList and Vector
- iconv() : Detected an illegal character in input string
- iconv() Detected an illegal character in input string
- php iconv() : Detected an illegal character in input string
- 分布式计算、并行计算及集群、网格、云计算的区别
- 多target下工程文件编辑
- linux驱动---DMA操作---驱动编写
- 将数组中的元素去重,并保持数组元素原顺序输出 要求时间复杂度尽可能的小
- 屏蔽Eclipse自带快捷键 消除Eclipse RCP快捷键定义冲突之终极法
- iconv - Convert Character Vector between Encodings
- ASP.NET MVC 入门5: Control 与 View的交互
- 开始设了Robots.txt禁止百度抓取
- 编程之美:小飞的电梯调度(k次停留)
- Gcc 编译与安装
- Linux 静态IP地址设置
- XDCTF WEB-some
- F. Ant colony(Codeforces Round #271)
- Python-OpenCV教程-4