mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-11 04:07:21 +03:00
Merge pull request #2831 from wiredfool/pr_2820
PPM: Use fixed list of whitespace, rather relying on locale
This commit is contained in:
commit
dbe043a9c5
|
@ -24,16 +24,7 @@ __version__ = "0.2"
|
||||||
#
|
#
|
||||||
# --------------------------------------------------------------------
|
# --------------------------------------------------------------------
|
||||||
|
|
||||||
b_whitespace = string.whitespace
|
b_whitespace = b'\x20\x09\x0a\x0b\x0c\x0d'
|
||||||
try:
|
|
||||||
import locale
|
|
||||||
locale_lang, locale_enc = locale.getlocale()
|
|
||||||
if locale_enc is None:
|
|
||||||
locale_lang, locale_enc = locale.getdefaultlocale()
|
|
||||||
b_whitespace = b_whitespace.decode(locale_enc)
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
b_whitespace = b_whitespace.encode('ascii', 'ignore')
|
|
||||||
|
|
||||||
MODES = {
|
MODES = {
|
||||||
# standard
|
# standard
|
||||||
|
|
Loading…
Reference in New Issue
Block a user