diff options
| author | Serhiy Storchaka <storchaka@gmail.com> | 2015-10-10 06:33:11 (GMT) |
|---|---|---|
| committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-10-10 06:33:11 (GMT) |
| commit | 462502b08484796d9a4b981aee5becac574ee43a (patch) | |
| tree | e39673830735e2789b2cf5ab16771350a5f382b0 /Objects/unicodeobject.c | |
| parent | 9918775206b86ba9a2af0287ec48c28ef3504dce (diff) | |
| download | cpython-462502b08484796d9a4b981aee5becac574ee43a.zip cpython-462502b08484796d9a4b981aee5becac574ee43a.tar.gz cpython-462502b08484796d9a4b981aee5becac574ee43a.tar.bz2 | |
Issue #24848: Fixed yet one bug in UTF-7 decoder. Testing for BASE64 character
was locale depending.
Diffstat (limited to 'Objects/unicodeobject.c')
| -rw-r--r-- | Objects/unicodeobject.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 6c46263..9368a3a 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -1555,7 +1555,10 @@ int unicode_decode_call_errorhandler(const char *errors, PyObject **errorHandler /* Is c a base-64 character? */ #define IS_BASE64(c) \ - (isalnum(c) || (c) == '+' || (c) == '/') + (((c) >= 'A' && (c) <= 'Z') || \ + ((c) >= 'a' && (c) <= 'z') || \ + ((c) >= '0' && (c) <= '9') || \ + (c) == '+' || (c) == '/') /* given that c is a base-64 character, what is its base-64 value? */ |
