# HG changeset patch # User Paul Boddie # Date 1497653576 -7200 # Node ID d39dbf8b26d25b8630921ed1272a899d36d0e7f0 # Parent c4a8c268316914179e2f132f530fd042cd2f7774 Test mixing of \u and \x values in unprefixed string literals. diff -r c4a8c2683169 -r d39dbf8b26d2 tests/unicode.py --- a/tests/unicode.py Fri Jun 16 00:37:50 2017 +0200 +++ b/tests/unicode.py Sat Jun 17 00:52:56 2017 +0200 @@ -132,6 +132,14 @@ except UnicodeDecodeError, exc: print "Attempt to decode", s, "as UTF-8 failed." +# Mix Unicode and byte values. + +u10 = "\u00e6\xf8\u00e5" +print "ISO-8859-15 values:" +print u10 # \u00e6ø\u00e5 +print u10.__class__ # __builtins__.str.string +print len(u10) # 13 + # Combine bytes and text. # The text should be decoded.