ASCII encoding error: ordinal not in range(128)
jicman
cabrera at wrc.xerox.com
Thu Mar 22 16:42:03 EST 2001
More information about the Python-list mailing list
Thu Mar 22 16:42:03 EST 2001
- Previous message (by thread): ASCII encoding error: ordinal not in range(128)
- Next message (by thread): deleting files from a script
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
paulp at ActiveState.com says... >I'm going to presume that "code" is a Unicode string. In that case, you >have to say HOW you want it encoded. What do you want to do with the >non-ASCII characters? Probably what you want is: > >"abc".encode("Latin-1") > >That means that characters between 128 and 255 will be encoded as the >equivalent byte-codes. Characters above 255 will simply not be >representable. I'm presuming that you won't run into any of those...if >you will be, then you need to think about representation some more. thank you very much. josé
- Previous message (by thread): ASCII encoding error: ordinal not in range(128)
- Next message (by thread): deleting files from a script
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list