[Python-Dev] repr vs. str and locales again

Peter Funk pf@artcom-gmbh.de
Fri, 19 May 2000 14:44:00 +0200 (MEST)


Guido van Rossum asks:
> The email below suggests a simple solution to a problem that
> e.g. Fran\347ois Pinard brought up long ago; repr() of a string turns
> all non-ASCII chars into \oct escapes.  Jyrki's solution: use
> isprint(), which makes it locale-dependent.  I can live with this.

How portable is the locale awareness property of 'is_print' among
traditional Unix environments, WinXX and MacOS?  This works fine on
my favorite development platform (Linux), but an accidental use of
this new 'feature' might hurt the portability of my Python apps to
other platforms.  If 'is_print' honors the locale in a similar way
on other important platforms I would like this.  Otherwise I would
prefer the current behaviour so that I can deal with it during the
early stages of development on my Linux boxes.

Regards, Peter
-- 
Peter Funk, Oldenburger Str.86, D-27777 Ganderkesee, Germany, Fax:+49 4222950260
office: +49 421 20419-0 (ArtCom GmbH, Grazer Str.8, D-28359 Bremen)