RE: wchar_t (was RE: 32'nd bit & UTF-8)

From: Jon Hanna (jon@hackcraft.net)
Date: Sat Jan 22 2005 - 11:36:55 CST

  • Next message: Jon Hanna: "RE: BOM in HTML (was Conformance (was UTF, BOM, etc))"

    > Jon Hanna replied:
    > > > What is wchar_t? Yes, it is a Unicode related type.
    > >
    > > It's not even that. wchar_t can be used with non-Unicode
    > > encodings, char can be used with UTF-8.
    > >
    >
    > Well, if you put char into wchar_t then you performed a Latin
    > 1 to Unicode conversion.

    Possibly; if char is 8 bits (or more, but with higher significant bits unused) and wchar_t is 16 or 32 bits (or more, but with higher significant bits unused) then this would indeed be the case.

    Even so there is no guarantee that
    wchar_t* wide_string = L"some text";
    Would use any unicode-based encoding for dealing with "some text".

    Regards,
    Jon Hanna
    Work: <http://www.selkieweb.com/>
    Play: <http://www.hackcraft.net/>
    Chat: <irc://irc.freenode.net/selkie>



    This archive was generated by hypermail 2.1.5 : Sat Jan 22 2005 - 11:39:37 CST