摘要: WideCharToMultiByte的代码页用来标记与新转换的字符串相关的代码页。MultiByteToWideChar的代码页用来标记与一个多字节字符串相关的代码页。常用的代码页由CP_ACP和CP_UTF8两个。使用CP_ACP代码页就实现了ANSI与Unicode之间的转换。使用CP_UTF8代码页就实现了UTF-8与Unicode之间的转换。下面是代码实现:1. ANSI to Unicodewstring ANSIToUnicode( const string& str ){int len = 0;len = str.length();int unicodeLen = :: 阅读全文
posted @ 2012-04-06 14:51 tianyuanmuge 阅读(415) 评论(0) 推荐(0) 编辑