diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2018-05-06 07:52:38 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-06 07:52:38 (GMT) |
commit | a3f19c3f52ddff85dd52eaa01b77b2d50cc9af3f (patch) | |
tree | f33c57d75c5cc2bc7828fa5673050dc0de3088fb /Tools | |
parent | cedc9b74202d8c1ae39bca261cbb45d42ed54d45 (diff) | |
download | cpython-a3f19c3f52ddff85dd52eaa01b77b2d50cc9af3f.zip cpython-a3f19c3f52ddff85dd52eaa01b77b2d50cc9af3f.tar.gz cpython-a3f19c3f52ddff85dd52eaa01b77b2d50cc9af3f.tar.bz2 |
Remove mojibake in the locale aliases mapping. (GH-6716)
Diffstat (limited to 'Tools')
-rwxr-xr-x | Tools/i18n/makelocalealias.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Tools/i18n/makelocalealias.py b/Tools/i18n/makelocalealias.py index c7ecace..b407a8a 100755 --- a/Tools/i18n/makelocalealias.py +++ b/Tools/i18n/makelocalealias.py @@ -19,6 +19,9 @@ def parse(filename): with open(filename, encoding='latin1') as f: lines = list(f) + # Remove mojibake in /usr/share/X11/locale/locale.alias. + # b'\xef\xbf\xbd' == '\ufffd'.encode('utf-8') + lines = [line for line in lines if '\xef\xbf\xbd' not in line] data = {} for line in lines: line = line.strip() |