[Patches] [Patch #103729] tutorial update for Unicode

noreply@sourceforge.net noreply@sourceforge.net
Mon, 12 Feb 2001 12:42:52 -0800


Patch #103729 has been updated. 

Project: python
Category: documentation
Status: Closed
Submitted by: ping
Assigned to : ping
Summary: tutorial update for Unicode

Follow-Ups:

Date: 2001-Feb-12 12:42
By: ping

Comment:
Oh, that sentence was in MAL's original text.
I think what he meant was that Python will
accept a literal u'Oui, André est là.' in place
of unicode('Oui, André est là.', 'latin-1'),
or in other words, if you already have Latin-1
strings in your source code, you only have to
stick a 'u' in front of them.

I'm checking in this less-Western-biased explanation:

Other characters are interpreted by using their respective ordinal values
directly as Unicode ordinals.  If you have literal strings in the standard
Latin-1 encoding that is used in many Western countries, you will find it
convenient that the lower 256 characters of Unicode are the same as the 256
characters of Latin-1.

Hope that's okay with you.
-------------------------------------------------------

Date: 2001-Feb-12 10:13
By: fdrake

Comment:
The second sentence of the second affected paragraph still doesn't seem
right (not affected by the patch).  Since ASCII is the default encoding,
Latin-1 chars are not particularly easy to encode without an explicit call
to the decoder (unicode('latin-1 stuff...', 'iso-8859-1')), which is too
much typing to say that it's easy to encode.

Otherwise it looks fine to me.  If you can adjust that sentence, please go
ahead and check it in.

Thanks!
-------------------------------------------------------

-------------------------------------------------------
For more info, visit:

http://sourceforge.net/patch/?func=detailpatch&patch_id=103729&group_id=5470