Re: Re: Call for help
David Binger <[email protected]> Mon, 5 Feb 2007 17:27:13 -0500
| Newsgroups | gmane.comp.web.quixote.user |
|---|---|
| Message-ID | <[email protected]> |
On Feb 5, 2007, at 5:17 PM, Neil Schemenauer wrote: > David Binger <[email protected]> wrote: >>>>> str(h8(u'\u1234')) >> '\xe1\x88\xb4' >> (this is the utf8 encoding of \u1234.) > > Do you sliently decode too? IOW, what does, > > h8('\xe1\x88\xb4') > > produce? I guess that's convenient but it would make encoding bugs > very difficult to find. Yes. The default decoding of qpy is utf-8. That's what the '8' is for. If the caller provides a str instance, it better be a utf-8 encoding.