Marc-Andre Lemburg <m...@egenix.com> added the comment:

On 18.02.2021 19:04, Eryk Sun wrote:
> 
> Eryk Sun <eryk...@gmail.com> added the comment:
> 
>> The APIs were written at a time where locale modifiers 
>> simply did mot exist. 
> 
> Technically, locale modifiers did exist circa 2000, but I suppose you mean 
> that they were uncommon to the point of being unheard of at the time.
> 
> The modifier field was specified in the X/Open Portability Guide Issue 3 
> (XPG3) in 1989, and again in XPG4 in 1992 as 
> "language[_territory][.codeset][@modifier]". I can't provide links to the 
> specifications (they're not freely available), but here's a link to X/Open 
> "Internationalisation Guide Version 2" (1993), which defines the modifier 
> field in section 5.1.2 (pages 88-89):
> 
> https://pubs.opengroup.org/onlinepubs/009269599/toc.pdf

Thanks for the link.

The standard may have already been defined in POSIX, but I'm pretty
sure this was not a thing on the SuSE Linux system I was working off
at the time :-)

This is what glibc supported in 2000:

https://sourceware.org/git/?p=glibc.git;a=blob;f=localedata/SUPPORTED;h=5ca1beb8eacbe5d86322cb2d015ec260422813d8;hb=1914953f71bf9ace1981d838b3777e473e63e8d1

vs. today:

https://sourceware.org/git/?p=glibc.git;a=blob;f=localedata/SUPPORTED

The first time I ever saw @modifiers in the wild was when the
Euro symbol was introduced in preparation for Jan 1, 2002.

Note that the encoding alias table in Python 2.0 does include an
entry "utf8@ucs4", which originated from the X11 local.alias file.
Apparently those modifiers were already in use on Digital Unix
at the time:

https://github.com/freedesktop/xorg-libX11/blob/deae12c6b683898f5213992d561a59d4ea889cca/nls/locale.alias.pre
(this is from 2003; couldn't find earlier references)

It is interesting to see that the locale.alias.pre file actually
did include Windows locale definitions. On Linux, those don't get
compiled in, so I didn't get to see them :-)

Also interesting is that they aliased e.g. cp1252 to ISO-8859-1,
even though the two encodings are not the same.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue43115>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to