Unicode Support

Programming, for all ages and all languages.
Post Reply
Guest

Unicode Support

Post by Guest »

Hi,

Just wondering what I need to do to add unicode support to my string class.
Tim

Re:Unicode Support

Post by Tim »

This depends on your compiler and OS. Windows treats wide characters (wchar_t) as Unicode, so you will need to convert from char and "..." to wchar_t and L"...". Other environments might use UTF-8, so although you would carry on using char, each char wouldn't necessarily be a single Unicode character. With UTF-8, one Unicode character can be represented by between 1 and 6 bytes.
Post Reply