Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
a3f19c3f
Commit
a3f19c3f
authored
May 06, 2018
by
Serhiy Storchaka
Committed by
GitHub
May 06, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove mojibake in the locale aliases mapping. (GH-6716)
parent
cedc9b74
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
Lib/locale.py
Lib/locale.py
+0
-2
Tools/i18n/makelocalealias.py
Tools/i18n/makelocalealias.py
+3
-0
No files found.
Lib/locale.py
View file @
a3f19c3f
...
...
@@ -923,7 +923,6 @@ locale_alias = {
'bo_in'
:
'bo_IN.UTF-8'
,
'bokmal'
:
'nb_NO.ISO8859-1'
,
'bokm
\
xe5
l'
:
'nb_NO.ISO8859-1'
,
'bokm
\
xef
\
xbf
\
xbd
'
:
'nb_NO.ISO8859-1'
,
'br'
:
'br_FR.ISO8859-1'
,
'br_fr'
:
'br_FR.ISO8859-1'
,
'brx_in'
:
'brx_IN.UTF-8'
,
...
...
@@ -1072,7 +1071,6 @@ locale_alias = {
'fr_fr'
:
'fr_FR.ISO8859-1'
,
'fr_lu'
:
'fr_LU.ISO8859-1'
,
'fran
\
xe7
ais'
:
'fr_FR.ISO8859-1'
,
'fran
\
xef
\
xbf
\
xbd
is'
:
'fr_FR.ISO8859-1'
,
'fre_fr'
:
'fr_FR.ISO8859-1'
,
'french'
:
'fr_FR.ISO8859-1'
,
'french.iso88591'
:
'fr_CH.ISO8859-1'
,
...
...
Tools/i18n/makelocalealias.py
View file @
a3f19c3f
...
...
@@ -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
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment