byte count unicode string

MonkeeSage MonkeeSage at
Wed Sep 20 10:12:29 CEST 2006

John Machin wrote:
> The answer is, "You can't", and the rationale would have to be that
> nobody thought of a use case for counting the length of the UTF-8  form
> but not creating the UTF-8 form. What is your use case?

Playing DA here, what if you need to send the byte-count on a server
via a header, but need the utf8 representation for the actual data?


More information about the Python-list mailing list