[工作备忘]生僻字处理

叶樉  11:27:47 yeshuang@yeshuang ~ $ echo "0x34 0x5a" | xxd -r | xxd 0000000: 345a                                     4Z
yeshuang@yeshuang ~ $ echo "0x34 0x5a" | xxd -r | iconv -f utf-16le -t gbk 娴 yeshuang@yeshuang ~ $ echo "0x5a 0x34" | xxd -r | iconv -f utf-16le -t gbk iconv: (标准输入):1:0: 无法转换
yeshuang@yeshuang ~ $ echo "0x5a 0x34" | xxd -r | iconv -f utf-16le -t gb18030 ▒9▒8 yeshuang@yeshuang ~ $ echo "0x5a 0x34" | xxd -r | iconv -f utf-16le -t gb18030 | xxd 0000000: 8139 f738                                .9.8
yeshuang@yeshuang ~ $ echo "0x5a 0x34" | xxd -r | iconv -f utf-16le -t utf8 | xxd iconv: 不支持转换到 utf8 iconv: 尝试用‘iconv -l’获取所支持的编码列表
yeshuang@yeshuang ~ $ echo "0x5a 0x34" | xxd -r | iconv -f utf-16le -t utf-8 | xxd 0000000: e391 9a                                  ...
yeshuang@yeshuang ~ $ echo "0xc3 0x36" | xxd -r | iconv -f utf-16le -t utf-8 | xxd 0000000: e39b 83                                  ...
yeshuang@yeshuang ~ $ echo "0xc3 0x36" | xxd 0000000: 3078 6333 2030 7833 360a                 0xc3 0x36.

你可能感兴趣的:(工作)