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/2002-December/031014.html below:

[Patches] Patch for xmlrpc encoding

[Python-Dev] Re: [Patches] Patch for xmlrpc encoding [Python-Dev] Re: [Patches] Patch for xmlrpc encodingFredrik Lundh fredrik@pythonware.com
Tue, 10 Dec 2002 09:40:26 +0100
Ragnar Kj=F8rstad wrote:

> > There isn't a reason to assume that strings use any other encoding,
> > either.=20
>=20
> Isn't that what sys.{get,set}defaultencoding is for?

Tthe default encoding stuff was added for experimental purposes only; in =
the
early days, there was some disagreement on whether the default encoding
should be UTF-8, ISO-Latin-1 (8-bit subset of unicode), or ASCII (7-bit =
sub-
set of unicode).  We finally settled on ASCII, for a couple of reasons.

Robust application code should assume that the default encoding will =
*always*
be ASCII, and use Unicode strings and ASCII-only strings for text.

> So perhaps it would be better to change the postgresql-modules to =
return
> unicode-objects instead of strings?

That's the correct solution, yes.

Checking for chars>=3D128 and returning Unicode only if the string =
contains
non-ASCII characters is also a valid approach.

</F>




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