A RetroSearch Logo

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

Search Query:

Showing content from http://www.python.org/pipermail/python-dev/2000-July/006751.html below:

[Python-Dev] ascii default encoding

[Python-Dev] ascii default encoding [Python-Dev] ascii default encodingFredrik Lundh Fredrik Lundh" <effbot@telia.com
Mon, 17 Jul 2000 00:35:56 +0200
jack wrote:


> Now that the default encoding for 8-bit strings has gone back to
> "ascii", shouldn't the initialization of strop.whitespace and friends
> only range over 0..128 in stead of 0..256?
>=20
> On the Macintosh string.whitespace is '\011\012\013\014\015 \312', but =

> the \312 causes problems because it can't be converted from/to unicode =

> as long as the default encoding is ascii...

on windows and unix boxes, the default locale is "posix" (aka "C"),
which in practice means "plain ascii".  the only way to end up with
non-ascii characters in whitespace/uppercase/lowercase/etc is to
explicitly change the locale (by calling locale.setlocale).

how does this work on the mac?  do the mac libraries use another
default locale?

one slightly radical way to solve this would be to modify the loops
in stropmodule.c/initstrop (changing 256 to 128).

</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