# HG changeset patch # User Paul Boddie # Date 1486393051 -3600 # Node ID 999024a0194e29ef01e581706cd9743d00078b7d # Parent 529270fc78bdc99cc8c3d5bac5b44eaab6335a92 Quote 2-digit Unicode values using \u, since \x encodes byte values in unprefixed strings. diff -r 529270fc78bd -r 999024a0194e lib/__builtins__/unicode.py --- a/lib/__builtins__/unicode.py Sun Feb 05 18:18:04 2017 +0100 +++ b/lib/__builtins__/unicode.py Mon Feb 06 15:57:31 2017 +0100 @@ -99,12 +99,9 @@ if n > 0xffff: b.append("\\U") digits = 8 - elif n > 0xff: + else: b.append("\\u") digits = 4 - else: - b.append("\\x") - digits = 2 x = hex(n, "") i = len(x)