python 2.7 and unicode (one more time)

Marko Rauhamaa marko at pacujo.net
Thu Nov 20 23:11:25 CET 2014


Ethan Furman <ethan at stoneleaf.us>:

> If your unicode string happens to contain a base64 encoded .png, then
> you could decode that into bytes. ;)

You could embed your PNG file in XML in binary form as CDATA. Then, your
"characters" would represent 8- or 16-bit integers. You just need to
replace all accidental occurrences of 

   ]]>

with

   ]]>]]><![CDATA[


Marko



More information about the Python-list mailing list