Improved check-localedef script
Zack Weinberg
zackw@panix.com
Fri Aug 4 13:13:00 GMT 2017
On Thu, Aug 3, 2017 at 5:17 PM, Zack Weinberg <zackw@panix.com> wrote:
> Here is an improved version of the check-localedef script I posted the
> other week.
Here is another revision which uses the SUPPORTED file to learn the
legacy encodings for each locale, rather than looking at %Charset:
annotations in the source files. You run it like this now (from the
top level of the source tree):
$ ./scripts/check-localedef.py -p localedata/locales -f
localedata/SUPPORTED localedata/locales/*
The final "localedata/locales/*" part is not _required_; it only
enables the script to tell you about any locales that are missing from
the SUPPORTED file.
(Also, still more bugs have been fixed; in particular the
"inappropriate character" errors have been restored. Doh.)
It's possible that Python isn't going to work out as the
implementation language for this script. I used it because its
standard library provides Unicode normalization and many codecs for
legacy encodings, but it doesn't know all of the encodings mentioned
in localedata/SUPPORTED (ARMSCII-8, GEORGIAN-PS, and EUC-TW are
missing) and I don't think it knows how to do transliteration, either.
And it's still a solid order of magnitude slower than it should be.
zw
-------------- next part --------------
A non-text attachment was scrubbed...
Name: check-localedef.errs
Type: application/octet-stream
Size: 52412 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20170804/eeadd1a7/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: check-localedef.py
Type: text/x-python
Size: 18442 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20170804/eeadd1a7/attachment.py>
More information about the Libc-alpha
mailing list