1.1 --- a/lib/__builtins__/unicode.py Mon Dec 12 23:33:28 2016 +0100
1.2 +++ b/lib/__builtins__/unicode.py Tue Dec 13 00:58:52 2016 +0100
1.3 @@ -31,9 +31,11 @@
1.4 "Encode the string to the given 'encoding'."
1.5
1.6 from_utf8 = Converter("UTF-8", encoding)
1.7 +
1.8 try:
1.9 from_utf8.feed(self)
1.10 return str(from_utf8)
1.11 +
1.12 finally:
1.13 from_utf8.close()
1.14
1.15 @@ -51,9 +53,11 @@
1.16 # Convert the string to UTF-8.
1.17
1.18 to_utf8 = Converter(encoding, "UTF-8")
1.19 +
1.20 try:
1.21 to_utf8.feed(s)
1.22 return utf8string(str(to_utf8))
1.23 +
1.24 finally:
1.25 to_utf8.close()
1.26