Embedding a literal "\u" in a unicode raw string.

romano.giannetti at gmail.com romano.giannetti at gmail.com
Mon Feb 25 11:21:58 EST 2008


> unicode(r"\uparrow", "utf-8") will break... sigh.
>

Moreover, I checked with 2to3.py, and it say (similar case):

-ok_preamble = unicode(r"""
+ok_preamble = str(r"""
 \usepackage[utf8]{inputenc}
 \begin{document}
 Añadidos:
 """, "utf-8")

which AFAIK will give an error for the \u in \usepackage. Hmmm...
should I dare ask on the developer list? :-)




More information about the Python-list mailing list