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++.
- [+] Digg: Feature this article
- [+] Del.icio.us: Bookmark this article
- [+] Furl: Bookmark this article