From 20e7555e5998b71e74ce438635be0cde8aaee509 Mon Sep 17 00:00:00 2001 From: Michael Hogg Date: Mon, 30 Sep 2013 09:54:25 +1000 Subject: [PATCH] Update PpmImagePlugin.py Bug fix for encoding of b_whitespace --- PIL/PpmImagePlugin.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/PIL/PpmImagePlugin.py b/PIL/PpmImagePlugin.py index c7c9c2eb4..a9c2bb283 100644 --- a/PIL/PpmImagePlugin.py +++ b/PIL/PpmImagePlugin.py @@ -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 = { # standard