colinta / SublimeStringEncode

Converts characters from one "encoding" to another using a transformation (think HTML entities, not character encodings)
Other
150 stars 22 forks source link

Deal with non-ascii characters #1

Closed danei closed 11 years ago

danei commented 12 years ago

In python 2, urllib.quote and base64.b64encode only accept ascii range characters so passing unicode string to them will raise KeyError and UnicodeEncodeError. For base64.b64encode, it accepts bytes rather than string, and urllib.quote fine with py3k but since ST2 ships with python 2 and python 2 won't fix this behavior (http://bugs.python.org/issue1712522), maybe some extra code to manually handle non-ascii characters will be needed.

colinta commented 11 years ago

ST3 uses Python 3, and so this is no longer an issue. Sorry, ST2 users!