Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.swapon.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Marko Rauhamaa Newsgroups: comp.lang.python Subject: Re: python 2.7 and unicode (one more time) Date: Fri, 21 Nov 2014 00:11:25 +0200 Organization: A noiseless patient Spider Lines: 17 Message-ID: <871tox8quq.fsf@elektro.pacujo.net> References: <1416491999.209592.193345213.3A6FF9A4@webmail.messagingengine.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="ff5cf27ef3d5b31f034d3b72bdc27a41"; logging-data="18083"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/wd3W8wANg4AW7QmXQfTNV" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:tkuWzcjk30XkvUvf9J0Lv064sUA= sha1:7+21LUDYsg+06cxuTRLJC77Yk8M= Xref: csiph.com comp.lang.python:81133 Ethan Furman : > 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 ]]>]]>