[Tutor] character format

Bob Gailer bgailer at alum.rpi.edu
Thu May 12 04:48:22 CEST 2005


At 06:42 PM 5/11/2005, Tony Meyer wrote:
> > You mean é? Oh, it is perfectly printable. It's even on my
> > keyboard (as unshifted 2), along with è, ç, à and ù. Ah, American
> > cultural assumption... ^^
>
> >From the email address, chances are that this was a New Zealand cultural
>assumption.  Ah, the French, lumping all English speakers under the American
>banner <wink>.
>
>Anyway, the explanation was right, if the label wasn't.  They are simply
>hexidecimal representations of characters.

Did you mean "hexadecimal"?


>Denise: there are many uses for this - to know what you need to do, we need
>to know what you are trying to do.  Where are you finding these characters?
>Are they in a file?  If so, what type of file is it, and what do you want to
>do with the file?  Those questions are more likely to lead you to the module
>you're after.
>
>I believe Max's guess was that the file is compressed with bzip (the first
>two characters will be BZ, as you found).  Try doing:
>
> >>> import bz2
> >>> print bz2.decompress(data)
>
>Where data is a string containing the characters you have.  (Although you
>say that compression is unlikely, the BZ characters would be a big
>co-incidence).
>
>=Tony.Meyer
>
>_______________________________________________
>Tutor maillist  -  Tutor at python.org
>http://mail.python.org/mailman/listinfo/tutor

Bob Gailer
mailto:bgailer at alum.rpi.edu
510 558 3275 home
720 938 2625 cell  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20050511/4475cb69/attachment.html


More information about the Tutor mailing list