Question about ASCII and nl_langinfo (locale work)
Baptiste Daroussin
bapt at freebsd.org
Mon Nov 16 21:07:05 UTC 2015
On Mon, Nov 16, 2015 at 10:00:29PM +0300, Andrey Chernov wrote:
> On 16.11.2015 20:35, Ed Schouten wrote:
> > I personally think it's a shame if we were to deviate from returning
> > "US-ASCII", for the reason that "US-ASCII" also happens to be the
> > preferred MIME name for the character set:
> >
> > http://www.iana.org/assignments/character-sets/character-sets.xhtml
> >
> > "ASCII" doesn't even seem to be an alias for this character set.
>
> Yes, I overlook it somehow. ASCII is not in the IANA, while both
> ANSI_X3.4-1968 and US-ASCII are.
>
> So, I reconsider the proposal. We can return ANSI_X3.4-1968 for POSIX/C
> (for Linux compatibility reasons) and left pure US-ASCII as it was
> (since it is used rarely).
To tell the truth, the locale change I made were painful enough (mostly my
fault)and I (for now) won't do anywork further beside fixing the fallouts if any
are left. But I do support this proposal!
>
> > In my opinion a decent implementation of newlocale() should support
> > any of the character set names and aliases provided on the IANA page,
> > but let nl_langinfo(CODESET) return the preferred MIME name.
>
> BTW, we already have and return non-IANA codesets historically (inspired
> by X11). I.e. we have ISO8859-* instead of preferred names ISO-8859-*,
> moreover, ISO8859-* even not the aliases (!) and IANA knows nothing
> about them. Linux have IANA preferred names here, i.e. ISO-8859-*.
>
> So the question is: should we rename ISO8859-* to ISO-8859-* to be IANA
> and Linux compatible?
>
> We can strip first (or all) "_" and "-" from the environment names (as
> Linux does), to not violate POLA.
I would like to see that as well, lots of new comers I have seen setup the
locales the IANA way and are unhappy because that does not work. The first plan
in the collation branch was to introduce the IANA syntax via an alias but in the
end I removed it, because there was already to many changes.
If one want to go further on the locale changes like the above proposal please
proceed.
Best regards,
Bapt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-arch/attachments/20151116/9487d0c7/attachment.bin>
More information about the freebsd-arch
mailing list