[Patches] [ python-Patches-1009389 ] Non-ascii in non-unicode
__credits__ in Lib/pydoc.py
SourceForge.net
noreply at sourceforge.net
Wed Nov 17 12:44:46 CET 2004
Patches item #1009389, was opened at 2004-08-14 18:35
Message generated for change (Comment added) made by ping
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1009389&group_id=5470
Category: Documentation
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Cherniavsky Beni (cben)
Assigned to: Nobody/Anonymous (nobody)
Summary: Non-ascii in non-unicode __credits__ in Lib/pydoc.py
Initial Comment:
There are non-ASCII chars in pydoc.__credits__ (the
"o/" in "Mynd you, mo/o/se bites Kan be pretty
nasti..."). In 2.3, a locale declaration of Latin-1
was added to pydoc.py. So now Python does not complain
-- but a string object (carrying no encoding info) with
Latin-1 bytes is still created and anynoby running in a
non-Latin-1 locale will not interpret the string correctly.
The patch fixes it by making pydoc.__credits__ a
Unicode string. *Note that this may break code* that
prints pydoc.__credits__ (in locales that can't encode
it) or otherwise assumes it's a string. Not that such
code exists anywhere...
Wait, ``import pydoc; help(pydoc)`` in "C" locale now
crashes <wink>! This is too ironic, IMHO, *don't
commit* until pydoc learns to handle unicode robustly...
----------------------------------------------------------------------
>Comment By: Ka-Ping Yee (ping)
Date: 2004-11-17 03:44
Message:
Logged In: YES
user_id=45338
I'm so sorry this has caused so much trouble.
The silly moose comment is my fault; it can just be removed.
----------------------------------------------------------------------
Comment By: Martin v. Löwis (loewis)
Date: 2004-11-14 02:21
Message:
Logged In: YES
user_id=21627
Ok, I have now backed-out the patch again.
----------------------------------------------------------------------
Comment By: Cherniavsky Beni (cben)
Date: 2004-11-13 17:39
Message:
Logged In: YES
user_id=36166
I told you not to commit! Now ``pydoc.py pydoc`` crashes.
Patch 1065986 fixes this.
----------------------------------------------------------------------
Comment By: Martin v. Löwis (loewis)
Date: 2004-08-22 09:08
Message:
Logged In: YES
user_id=21627
Thanks for the patch. Committed as pydoc.py 1.96.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1009389&group_id=5470
More information about the Patches
mailing list