UTF8-GBK转换
函数文档
1 | std::string boost::locale::conv::between ( char const * begin, |
Convert a text in range [begin,end) to to_encoding from from_encoding
将范围[begin,end)中的文本从from_encoding转为to_encoding
1 | std::string boost::locale::conv::between ( char const * text, |
Convert a text to to_encoding from from_encoding
将文本从from_encoding转换为to_encoding
1 | std::string boost::locale::conv::between ( std::string const & text, |
Convert a text to to_encoding from from_encoding
将文本从from_encoding转换为to_encoding
1 | template<typename CharType > |
convert UTF text in range [begin,end) to a text encoded with charset according to policy how
根据策略将范围[begin,end)中的UTF文本转换为使用字符集编码charset
的文本
1 | template<typename CharType > |
convert UTF text in range [begin,end) to a text encoded according to locale loc according to policy how
将范围[begin,end)中的UTF文本转换为区域设置loc
编码的文本
Note
throws std::bad_cast if the loc does not have info facet installed
throwsstd::bad_cast
如果没有安装loc
信息
1 | template<typename CharType > |
Convert a text from charset to UTF string
将文本从charset
字符集转换为UTF字符串
1 | template<typename CharType > |
Convert a text from UTF to charset
将文本从UTF转换为charset
字符集
1 | template<typename CharType > |
Convert a text in UTF to locale encoding given by loc
将UTF格式的文本转换为loc
给出的区域设置编码
Note
throws std::bad_cast if the loc does not have info facet installed
throws std::bad_cast
如果loc
没有安装
1 | template<typename CharType > |
Convert a text in UTF to locale encoding given by loc
将UTF格式的文本转换为loc
给出的区域设置编码
Note
throws std::bad_cast if the loc does not have info facet installed
throws std::bad_cast
如果loc
没有安装
1 | template<typename CharType > |
convert string to UTF string from text in range [begin,end) encoded with charset according to policy how
将范围 [begin,end)中的字符串用charset
字符集编码的文本转换为UTF字符串
1 | template<typename CharType > |
convert string to UTF string from text in range [begin,end) encoded according to locale loc according to policy how
将范围[begin,end)中的文本根据区域设置loc
转换为换为UTF字符串
Note
throws std::bad_cast if the loc does not have info facet installed
throws std::bad_cast
如果loc
没有安装
1 | template<typename CharType > |
convert a string text encoded with charset to UTF string
将使用charset
字符集编码的字符串文本转换为UTF字符串
1 | template<typename CharType > |
Convert a text from charset to UTF string
将文本从charset
字符集转换为 UTF 字符串
1 | template<typename CharType > |
Convert a text in locale encoding given by loc to UTF
将loc
区域设置编码中的文本转换为UTFNote
throws std::bad_cast if the loc does not have info facet installed
throws std::bad_cast
如果loc
没有安装
1 | template<typename CharType > |
Convert a text in locale encoding given by loc to UTF
将loc
区域设置编码中的文本转换为UTFNote
throws std::bad_cast if the loc does not have info facet installed
throws std::bad_cast
如果loc
没有安装
1 | template<typename CharOut , typename CharIn > |
Convert a Unicode text in range [begin,end) to other Unicode encoding
将范围 [begin,end)中的Unicode文本转换为其他Unicode编码
1 | template<typename CharOut , typename CharIn > |
Convert a Unicode NUL terminated string str other Unicode encoding
将以NULL为终止字符的Unicode str转换到其他Unicode编码
1 | template<typename CharOut , typename CharIn > |
Convert a Unicode string str other Unicode encoding
转换Unicode字符串str到其他Unicode编码
例子
UTF8 <-> GBK
1 |
|