BCB UTF-8 格式转换

如果是字串转换.BCB有多个方法(如TStringConverter,或API的 WideCharToMultiByte/MultiByteToWideChar,VCL的WideCharToString/StringToWideChar等)
当然,BCB本身就支持三种字串,前两种可自动转,后一种有函数:
String x; //GBK
WideString y; //unicode
UTF8String z; //utf8
x=y; //自动
y=x; //自动
z=AnsiToUtf8(x);
x=Utf8ToAnsi(z);

Written by gegewan on 十一月 14th, 2008 with no comments.
Read more articles on C/C++.

Related articles

No comments

There are still no comments on this article.

Leave your comment...

If you want to leave your comment on this article, simply fill out the next form:




You can use these XHTML tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> .