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-May/023858.html below:

[Python-Dev] Unicode howto in the works

[Python-Dev] Unicode howto in the works - feedback appreciated [Python-Dev] Unicode howto in the works - feedback appreciatedFredrik Lundh fredrik@pythonware.com
Wed, 1 May 2002 10:14:43 +0200
Gustavo Niemeyer wrote:
> I'm not sure if this is a common issue with other languages. But at
> least here (brazilian portuguese), this is a little bit inconvenient.
> Fortunately, fixing this is easy, since site.py was nicely prepared
> for this (thanks <author> ;-):
> 
> if 0:
>     # Enable to support locale aware default string encodings.
>     import locale
>     loc = locale.getdefaultlocale()
>     if loc[1]:
>         encoding = loc[1]
> 
> Enabling it should be enough

that's a really great way to write non-portable code, of
course.

please keep your encodings explicit.

(if you're printing lots of stuff, use an encoded stream)

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