This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author andre
Recipients andre
Date 2008-11-14.11:03:11
SpamBayes Score 5.4037364e-06
Marked as misclassified No
Message-id <1226660595.21.0.207360549663.issue4323@psf.upfronthosting.co.za>
In-reply-to
Content
When saving a source file with non-ascii characters from an IDLE window,
on Windows platform (XP and Server 2003 at least)
with locale English US  

  locale.getdefaultlocale()
  ('en_US', 'cp1252')

IDLE prompts in IOBinding.py with the message 
"non Ascii found, yet no encoding declared, Add a line like # -*- 
coding: cp1252 -*-"

If accepted, the file is saved with the wrong encoding.
Afterwards, it is read back by IDLE without any problem and it looks 
good in the IDLE window.

However, if a string with non-ascii characters is sent to another 
module (i.e. email  MIMEText)
the string is wrong.

The same source would be rejected by python in terminal mode and by 
IDLE on Linux.
History
Date User Action Args
2008-11-14 11:03:15andresetrecipients: + andre
2008-11-14 11:03:15andresetmessageid: <1226660595.21.0.207360549663.issue4323@psf.upfronthosting.co.za>
2008-11-14 11:03:13andrelinkissue4323 messages
2008-11-14 11:03:12andrecreate