
On Fri, Jun 4, 2010 at 9:17 AM, Eric Niebler <eric@boostpro.com> wrote:
On 6/4/2010 7:06 AM, Beman Dawes wrote:
UTF-16 via wchar_t is already supported for Windows (and possibly other environments) where wchar_t a UTF-16 type.
IIRC, Windows uses wchar_t for UCS-2, not UTF-16. No surrogate pairs.
My understanding is that Windows switched to UTF-16 awhile ago. http://msdn.microsoft.com/en-us/library/dd374081%28VS.85%29.aspx says "Unicode-enabled functions in Windows use UTF-16" http://en.wikipedia.org/wiki/UTF-16/UCS-2 says "UTF-16 is the native internal representation of text in the Microsoft Windows 2000/XP/2003/Vista/CE..." and "Older Windows NT systems (prior to Windows 2000) only support UCS-2." I haven't actually run tests to see if surrogate pairs are handled correctly in filesnames. --Beman