????C++????????????
???????????? ???????[ 2014/1/17 9:28:58 ] ????????C++ ????
????5. C++????????????
????5.1. ???????????
???????????????????????????????Windows/Linux??VC/gcc??????м?????????
????????????????????????ascii???????ascii???????????????gettext???????????????????С?
???????????????????????
????????VC??gcc???汾??
??????????????в??????ascii?????????????????????????????????
??????????????????л?????
??????????????????????????÷?ascii?????
??????????л???????????????????£???????GB18030?????Windows??UTF-8?????Linux??
???????????????????????????????????????????
??????????????????????BOM??UTF-8????
????????VC?????????汾??
????????gcc 4.4.0????汾??
?????????????????????GB18030????
????????VC???????????汾??
????????gcc???汾?????????????????-finput-char=gb18030??????
??????????????????????????÷?ascii?????
??????????????????л?????
???????????????????????????????????????????
??????????????????????BOM??UTF-8????
????????VC?????????汾??
????????gcc 4.4.0????汾??
?????????????????????GB18030????
????????VC???????????汾??
????????gcc???汾?????????????????-finput-char=gb18030??????
????5.2. ???????
?????????????????????????????????????????????????????????????ascii?????
????????????????????????????????????е????????????????????????GB18030???????????????GB18030?????Windows??????UTF-8?????
????Linux???????
????6. ????????
????6.1. ????????????????
?????????????????????????????????????д?????????????????????????????????????????????Щ????????????Ч??????????????????????е????????????????????????
???????????????????????Щ???????????????????????????????????????????浽???????????????????д????????????????????????????????????????????μ?????????????????????κα??????????????????????????д?????????????????????????????????й????
?????????????ó???????????????????UTF-8??????????????????????UTF-8?????????????????????????д????????????????????????????????ж?????????????????????????????????б????????
????????????????????????????????д??????????ж??????????????????б???????????????????????????????????????????????????????????????????????д????????????????????????????????????
???????????????????????????????????л???????????????????????ios::imbue()???????io?????????????????????C++???????????????????????????????????????б????????????????????????????????????wcstombs()??mbstowcs()???????е?????????locale::global()??setlocale()????????????????????
????????????????????????????????????????????????????б????????????????ɡ?
???????????????Σ????????iconv???????????????????????????
????????????????????
????6.2. gettext??iconv??????
????????gettext??iconv??????GNU Project??????????????????????г?????????????????????????Щ????Boost 1.48.0?У?Boost.Locale?????????????????????gettext??iconv???????????????????????????????Сд?任?????????????????? ???????????????????/???????????????????????????????????????????y?????о?????á?
??????
![](/images/ad-banner/ad-banner.png)
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11