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

[Python-Dev] IDLE and non-ASCII characters

[Python-Dev] IDLE and non-ASCII charactersGuido van Rossum guido@digicool.com
Sun, 13 May 2001 17:51:17 -0500
> Thanks to a bug report I got, I noticed for the first time that you
> cannot enter non-ASCII characters in IDLE anymore. Eg. at the shell
> prompt, you may get
> 
> >>> s='äö'
> UnicodeError: ASCII encoding error: ordinal not in range(128)

This doesn't bother me, because I don't know how to enter such
characters with my US keyboard anyway. :-) :-)

> Likewise, when trying to save a file that has non-ASCII characters,
> you get a traceback.

Yes, this has bitten me once.  It was very painful (I lost a few hours
worth of writing).

In other words, I agree it's a problem!

> Now, I think I understand all the causes of the problem (Tkinter
> returning Unicode objects, and so on). However, I'm curious whether
> anybody has proposals on how to deal with it.

Not me -- unfortunately, there are too many alternatives to IDLE to
be able to justify working on it much.

> For saving text files, if Python had an encoding directive, things
> might be easier :-) For the shell prompt, I've no idea how to solve
> this best.
> 
> So any suggestions are welcome.

Ditto.

Postscript: using cut and paste, I *can* enter "s='äö'" in IDLE at the
Python prompt, both on Linux and on Windows 98.  It prints as
'\xe4\xf6' on both systems.  What changed?

--Guido van Rossum (home page: http://www.python.org/~guido/)



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