Newsgroups: comp.std.c Path: utzoo!henry From: henry@utzoo.uucp (Henry Spencer) Subject: Re: Internationalization Message-ID: <1990Feb21.183919.12931@utzoo.uucp> Organization: U of Toronto Zoology References: Date: Wed, 21 Feb 90 18:39:19 GMT In article mcdaniel@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@zoo.toronto.edu