Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
open-source
logilab-mtconverter
Commits
9dad7d0aa2a9
Commit
2c75bad4
authored
Jun 29, 2009
by
Sylvain Thénault
Browse files
#8014: annoying crash depending on locale configuration
parent
a9a6c611aae8
Changes
1
Hide whitespace changes
Inline
Side-by-side
__init__.py
View file @
9dad7d0a
...
...
@@ -29,8 +29,11 @@ except ImportError:
chardet
=
None
mimetypes
.
encodings_map
[
'.bz2'
]
=
'bzip2'
# register bzip2 encoding
try
:
DEFAULT_ENCODING
=
locale
.
getpreferredencoding
()
except
locale
.
Error
:
DEFAULT_ENCODING
=
locale
.
getpreferredencoding
(
do_setlocale
=
False
)
DEFAULT_ENCODING
=
locale
.
getpreferredencoding
(
do_setlocale
=
False
)
BINARY_ENCODINGS
=
set
((
'gzip'
,
'bzip2'
,
'base64'
))
TEXT_MIMETYPES
=
set
((
'application/xml'
,
'application/xhtml+xml'
))
...
...
Write
Preview
Supports
Markdown
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