字符集编码转换

时间:2015-09-23 12:40:36

标签: bash utf-8 character-encoding iso-8859-1 iconv

我不明白我的charater编码的字符集是什么。

这是我的bash提示符:

$ locale
LANG=fr_FR.UTF-8
$ echo 'é'
é
$ echo é > test
$ iconv -f iso8859-1 -t utf-8 test
é
$ iconv -f utf-8 -t iso8859-1 test
é
$ file test
test: UTF-8 Unicode text
$ iconv -f utf-8 -t iso8859-1 test > test2
$ file test2
test2: UTF-8 Unicode text
$ cat test2
é

有人可以向我解释一下吗?

我从curl命令得到'©'字符,我想以utf-8字符处理输出。

0 个答案:

没有答案