Commit 384d7712 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Merge pull request #330 from undingen/unicode_test

add small unicode encoding test
parents d044212d 87f8b692
...@@ -32,3 +32,12 @@ try: ...@@ -32,3 +32,12 @@ try:
hasattr(object(), u"\u0180") hasattr(object(), u"\u0180")
except UnicodeEncodeError as e: except UnicodeEncodeError as e:
print e print e
def p(x):
return [hex(ord(i)) for i in x]
s = u"\u20AC" # euro sign
print p(s)
print p(s.encode("utf8"))
print p(s.encode("utf16"))
print p(s.encode("utf32"))
print p(s.encode("iso_8859_15"))
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment