diff options
Diffstat (limited to 'pygments/unistring.py')
-rw-r--r-- | pygments/unistring.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pygments/unistring.py b/pygments/unistring.py index 06cb9560..2fac753e 100644 --- a/pygments/unistring.py +++ b/pygments/unistring.py @@ -126,9 +126,9 @@ if __name__ == '__main__': # Jython can't handle isolated surrogates f.write("""\ try: - Cs = eval(r"%r") + Cs = eval(u_prefix + r"%s") except UnicodeDecodeError: - Cs = '' # Jython can't handle isolated surrogates\n\n""" % val) + Cs = '' # Jython can't handle isolated surrogates\n\n""" % repr(val).lstrip('u')) else: f.write('%s = %r\n\n' % (cat, val)) f.write('cats = %r\n\n' % sorted(categories.keys())) |