mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-03 03:50:09 +03:00
Merge e70424644a
into c6b41f27a1
This commit is contained in:
commit
f8047b138a
|
@ -24,7 +24,15 @@ from PIL import Image, ImageFile
|
||||||
#
|
#
|
||||||
# --------------------------------------------------------------------
|
# --------------------------------------------------------------------
|
||||||
|
|
||||||
b_whitespace = string.whitespace.encode('ascii','ignore')
|
b_whitespace = string.whitespace
|
||||||
|
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