Re: Fw: Unicode & space in programming & l10n

From: Kenneth Whistler (kenw@sybase.com)
Date: Fri Sep 22 2006 - 19:19:52 CDT

  • Next message: Steve Summit: "Re: Unicode & space in programming & l10n"

    > Ken Whistler wrote:
    > > It is perfectly fine for UTF-32, if you do this correctly.
    > > For example:
    > >
    > > typedef unsigned short UShort16;
    > > typedef unsigned int UInt32;
    > >
    > > typedef UShort16 utf16char;
    > > typedef UInt32 utf32char;
    >
    > Please don't do this! Please do
    >
    > #include <stdint.h>
    >
    > typedef uint16_t utf16char;
    > typedef uint32_t utf32char;
    >
    > instead.
    >
    > > At that point, you can safely port your entire code to *any*
    > > platform, with at most one compiler-specific #ifdef in your
    > > fundamental header file.
    >
    > With at most zero compiler-specific #ifdefs.

    Well, sure, *if* your compilers are all completely up-to-date.

    Depending on how wide you have to cast your platform portability,
    and how old the compilers are that you have to use, this may
    or may not be possible. Many older compilers will simply
    barf on #include <stdint.h>, including two of the ones I currently
    must use. ;-)

    --Ken



    This archive was generated by hypermail 2.1.5 : Fri Sep 22 2006 - 19:21:32 CDT