I am trying to convert UTF-8 string to C/POSIX locale string
The UTF-8 string is "abc123£" (in bash "abc123\\302\\243"`)
iconv() is returning EILSEQ to me in case 1, but success in case 2.
What is the reason for this?
Also, how can I successfully convert any UTF-8 string to 'C' locale string.
因为您的C
语言环境使用的字符集(可能是US-ASCII)没有用于£
的字符,并且不能无损地转换字符串。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.