阅读背景:

将utf8编码的字符串转换为本地8位编码的字符串,并用空格替换不可转换的字符

来源:互联网 

I need to convert utf-8 string into local 8-bit encoded string (single character is represented by char) and keep the number of characters in the result string the same. So, I want unconvertable characters in the original utf string become the white spaces in the result string. Unfortunately the boost::locale::conv::from_utf does not provide such method of conversion. It provides only two: I need to convert utf-8 string into local 8-bit




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: