Internationalization

Henry Spencer henry at utzoo.uucp
Thu Feb 22 05:39:19 AEST 1990


In article <MCDANIEL.90Feb20135828 at orenda.amara.uucp> mcdaniel at amara.uucp (Tim McDaniel) writes:
>If I want to write C programs to be more easily portable to Europe,
>say, what facilities exist in the Standard to help?

The standard neither particularly helps nor particularly hinders this.
There are some minor oddments -- the "locale" stuff -- for customizing
things like date formats, but you have to do most of the work yourself.
Apart from the problems of error messages etc. (I think one of the POSIX
committees is looking at this), the big thing to watch is that you treat
characters as 8-bit objects, and don't get clever with using the top bit
for a flag.

>How about for Asian countries, like Japan?

That's a whole new can of worms.  The problem there is that 8 bits is
not enough for the character set.  There is a standard-defined type
wchar_t, which is a sufficiently wide character type, plus a few functions
that operate on it, plus a way to write wchar_t string literals, but it's
not what you would call an elaborate set of aids to internationalization.
-- 
"The N in NFS stands for Not, |     Henry Spencer at U of Toronto Zoology
or Need, or perhaps Nightmare"| uunet!attcan!utzoo!henry henry at zoo.toronto.edu



More information about the Comp.std.c mailing list