Merge pull request #2831 from wiredfool/pr_2820

PPM: Use fixed list of whitespace, rather relying on locale
This commit is contained in:
wiredfool 2017-11-05 15:00:28 +00:00 committed by GitHub
commit dbe043a9c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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