WindowsLinuxWindowsGB18030LinuxWindowsLinuxC++1.C++1.1.C++C++(cpp/.h)(GB18030/UTF-8)C++C++(char)(wchar_t)Unicode(VCUTF-16BEgccUTF-32BE)1.2.C++Windows(VisualStudio)GB18030WindowsC++GB18030LinuxUTF-8C++VCGB18030gcc/g++utf-8-fexec-charsetNoteWindowsGB18030LinuxUTF-81.3.+--------+||----------+---+----+|+---+----+||----------+---+----+|+---+----+||----------+--------+NoteUTF-8(gcc)gccGB18030GB18030XXXUTF-8UTF-8GB18030C++2.2.1.gcc/vcC++gcc(v4.3.220081105)UTF-8UTF-8BOMBOMUTF-8vc2003:UTF-8UTF-8BOMvc2005+:UTF-8BOMNotegcc-finput-charsetasciiasciivc2.2.C/C++asciiascii\xHH\uXXXXutf-8gettextasciiascii\xHH\uXXXXgettextasciigccvcUnicodeUTF-8ASCIIUnicodeUTF-8gcc()BOMvc2005BOMgccvcUTF-8gcc(4.4.0)BOMUTF-8WindowsGB18030=vcgcc-finput-charset=gb18030GB18030GB18030isasupersetofASCIIandcanrepresentthewholerangeofUnicodecodepoints(GB18030ASCIIUnicode)GB18030UnicodeGB18030VC3.C++(char)(wchar_t)(string/cout/strlenwstring/wcout/wcslen)(vcGB18030gccUTF-8)UnicodevcUTF-16gccUTF-32C++vcGB18030vcGB18030gccUTF-8gccUTF-8(asciigettext)C++Java/.NetJava/.NetUnicode/asciiasciigettextgettextascii\uXXXXasciiasciiasciiasciiasciiNoteGB18030\xXXGB180304.(locale::global(locale()))C++asciiasciiC++()VCGB18030gccUTF-8(-fexec-charset)5.C++5.1.Windows/LinuxVC/gccasciiasciigettextVCgccasciiasciiGB18030WindowsUTF-8LinuxBOMUTF-8VCgcc4.4.0GB18030VCgcc-finput-char=gb18030asciiBOMUTF-8VCgcc4.4.0GB18030VCgcc-finput-char=gb180305.2.asciiGB18030GB18030WindowsUTF-8Linux6.6.1.()UTF-8UTF-8()ios::imbue()ioC++wcstombs()mbstowcs()(locale::global()setlocale())iconv6.2.gettexticonvgettexticonvGNUProjectBoost1.48.0Boost.Localegettexticonv/