Commit 87f8b692 authored by Marius Wachtler's avatar Marius Wachtler

add small encoding test

parent d044212d
...@@ -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