用GCC編譯如下代碼時出錯:
wxString msg(_T("中華人民共和國"));
error:converting to execution character set: Illegal byte sequence
解決方法:
1、把這個cpp檔案存成utf8的檔案,再編譯就可以了。
2、也有人通過設定編譯選項:-finput-charset=GBK解決問題。不過,我覺得這樣的可移植性不強。參見:
http://blog.csdn.net/ynzhangyao/article/details/1957265
本文轉自 h2appy 51CTO部落格,原文連結:http://blog.51cto.com/h2appy/676616,如需轉載請自行聯系原作者