c++ - Why Microsoft have two type of character set's ? -


this question has answer here:

all application need multi language support why microsoft visual studio have 2 type of character set's

please clarify me, in advance.

first, it's not microsoft. c++03 required 2 character sets. (formally, think can identical, don't know of implementation on general purpose machine are.) c++11 requires 4 (std::string, std::u16string, std::u32string , std::wstring); regretfully, doesn't require u16 , u32 versions iostream (but doubtlessly come).

different applications have different trade-offs. in application i'm working on, restrict character set traditionally called ascii, wchar_t make things bigger (and things down, because of less locality). in text applications (or did) on own time, used utf-8 internally; it's no more complex utf-16, , (where international characters allowed in few specific contexts), requires lot less space. if doing full text processing (say editor), i'd use utf-32.

as happens, choice of 16 bit wchar_t turned out bad choice, full unicode requires @ least 21 bits. (when microsoft made choice, of course, seemed best idea, since unicode still 16 bits.) other systems (which adopted unicode later) have 32 bit wchar_t. (the exception ibm, adopted unicode early.)


Comments

Popular posts from this blog

matlab - Deleting rows with specific rules -

jquery - How would i go about shortening this code? And to cancel the previous click on click of new section? -