On Sat, Apr 13, 2013 at 11:17 PM, Random832 <random...@fastmail.us> wrote: > I am forced to ask, though, why character cell values are stored in utf-8 > rather than as wchar_t (or as an explicitly unicode int) in the first place, > particularly since the simplest way to detect a wide character is to call > the function wcwidth. What was the reason for this design decision? It > doesn't save any space, since on most systems UTF_SIZ == sizeof(int) == > sizeof(wchar_t).
The ISO/IEC 10646:2003 Unicode standard 4.0 says that: "The width of wchar_t is compiler-specific and can be as small as 8 bits. Consequently, programs that need to be portable across any C or C++ compiler should not use wchar_t for storing Unicode text. The wchar_t type is intended for storing compiler-defined wide characters, which may be Unicode characters in some compilers." utf-8 is rather straightforward to handle and process.