A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2001-December/019087.html below:

[XML-SIG] printing Unicode xml to StringIO

[Python-Dev] Re: [XML-SIG] printing Unicode xml to StringIO [Python-Dev] Re: [XML-SIG] printing Unicode xml to StringIOMartin v. Loewis martin@v.loewis.de
Fri, 28 Dec 2001 18:02:17 +0100
> Unicode support in cStringIO would require a new implementation
> since the machinery uses raw byte buffers.

Not necessarily. You could add a flag saying that whether those bytes
represent Unicode strings or not. If they do, you pick an encoding of
your choice (perhaps unicode-internal), and convert the existing bytes
to that encoding on first sighting of a Unicode string (assuming that
everything so far is in the system encoding). When returning the bytes
to the user, you build a Unicode object if the flag is set.

Of course, you'd still have to touch every method, to analyse the
flag...

Regards,
Martin



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4