Unicode perplex

John Roth newsgroups at jhrothjr.com
Mon Jun 21 23:59:51 CEST 2004

"Ivan Voras" <ivoras at __geri.cc.fer.hr> wrote in message
news:cb7jks$9hv$1 at bagan.srce.hr...
> John Roth wrote:
> > The problem is that I've got a normal string where
> > the byte stream is actually UTF-8. How do I turn
> > it into a Unicode string? Remember that the trick
> does
> str2 = str.decode('utf-8')
> work?

[dirty word]. Thanks. I knew I'd seen it before
somewhere; it just didn't occur to me to look in
the obvious place. It sure ought to.


John Roth
> -- 
> What part of "Ph'nglui mglw'nath Cthulhu R'lyeh wgah'nagl fhtagn" don't
> you understand?

More information about the Python-list mailing list