Localization (4.4.2.1)

Rex Jaeschke rex at aussie.COM
Tue Feb 19 01:28:28 AEST 1991


> The whole locale stuff is botched, in my opinion.  It seems that too

You still have not said in what way. Give a specific example please.

> few people did have any real interest in this.  The solution proposed
> is very cumbersome, and using it in all its ramifications basically
> requires a tutorial or at least a lot of example code.  I haven't
> looked very hard, so I would appreciate pointers to such things if
> they do exist.

I expect that most programmers will fall into 2 main camps: those that will 
use the "C" locale getting the behavior they have been used to for years; 
and those who use an entire local locale.  That is, they will not likely
use composite locales.  In the latter case I expect implementers will
provide a compiler option to make their own locale the default so
programmers won't even have to call setlocale.  (This might not be
sanctioned by Standard C but if you aren't interested in portability so
what?)

If you want to mix locales then I agree it can get messy.  But the simple
fact is that places near (and not so near) international borders DO HAVE
composite ways of doing things.  For example, one Swiss location might use
composites made up from France, Switzerland, and Italy while another might
use German and/or Austrian.  I think the ability to have composite locales
simply reflects the real world.

As to a tutorial, I think the definition of locales was intentionally left 
vague so we did not arbitrarily constrain implementors. As more experience 
is gained it will be documented.

PJ Plauger, ANSI C secretary and ISO C convenor, played a significant role 
in our support for internationalization. He is now an independent 
consultant and recently, finished writing a complete portable C runtime 
library (in C, of course). He is licensing this to implementors. This will 
all be documented in his upcoming book from Prentice-Hall and the source 
will be available `at reasonable cost'. One thing he has spent quite some 
time on is locales. Basically, he spent lot's of time looking at ways to 
implement them given the direction of ANSI C. He has suceeded in doing so 
and learned a lot along the way. He documents much of his efforts in his 
column in the March 1991 issue of my publication `The Journal of C Language 
Translation.' And I expect there will be a second article probably in June.

I am not personally aware of many groups working hard on locale 
definitions. One I do know is DEC. Their PDP-11 C compiler group supports 
quite an elaborate set. I mentioned the Danish national effort last 
posting. I suspect IBM, H-P, AT&T, and Unisys all have significant efforts 
in this area given their general interest in internationalization. Note too 
that all these companies were represented on ANSI C and I recall seeing 
input from them during deliberations.

Rex

----------------------------------------------------------------------------
Rex Jaeschke     |  Journal of C Language Translation  | C Users Journal
(703) 860-0091   |        2051 Swans Neck Way          | DEC PROFESSIONAL
rex at aussie.COM   |     Reston, Virginia 22091, USA     | Programmers Journal
----------------------------------------------------------------------------
Convener of the Numerical C Extensions Group (NCEG)
X3J11 member and US International Representative to ISO C (WG14)
----------------------------------------------------------------------------



More information about the Comp.std.c mailing list