CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 15 of 18

Threaded View

  1. #1
    Join Date
    Aug 2008
    Posts
    902

    Great Big Can O' Worms (UNICΘDЭ)

    Ok, so like many programmers, I've just put my fingers in my ears and closed my eyes, pretending unicode didn't exist and ANSI strings were the only string representation.

    Now suddenly I find myself needing to write code that can properly handle foreign text. If only things were easier...

    If Windows and the C++ Standard Library had full support for UTF-8, my life would be easy, but as far as I know, they don't.

    Does Windows even have full support for all unicode characters? Or only 16-bit characters? If wchar_t maps to ushort, how does it handle 3 or 4 byte characters? Does it handle them at all?

    Visual Studio seems to have added char16_t and char32_t, along with u16string and u32string, but it seems to lack support for the corresponding literals u" " and U" ", or am I missing something?

    It seems to me like I should maybe use wstring internally, and crate functions to convert incoming UTF-8 to, what I assume is UTF-16.

    I've read a lot of posts on this topic and various articles, and it still confuses the hell out of me. It creates more questions than answers.
    Last edited by Chris_F; May 12th, 2010 at 01:45 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured