Update PpmImagePlugin.py

Bug fix for encoding of b_whitespace
This commit is contained in:
Michael Hogg 2013-09-30 09:54:25 +10:00
parent 2e4b0903e3
commit 20e7555e59

View File

@ -24,7 +24,10 @@ from PIL import Image, ImageFile
# #
# -------------------------------------------------------------------- # --------------------------------------------------------------------
b_whitespace = string.whitespace.encode('ascii','ignore') import locale
locale_name,locale_id = locale.getlocale()
b_whitespace = string.whitespace.decode(locale_id)
b_whitespace = b_whitespace.encode('ascii','ignore')
MODES = { MODES = {
# standard # standard