wxSTC problems with non-European text and symbols

That would be len(u)*2, but it depends on what you're using it for. If
you're writing it to a standard Python file, you want len(u). If you're
passing it to some Windows API, and you really intend to send the UCS-16
version, then it's len(u)*2.

For computing internal memory use, it depends on whether your Python was
compiled to use 2-byte or 4-byte Unicode internally.

···

On Wed, 18 Jan 2006 16:52:07 +0100, jmf <jfauth@bluewin.ch> wrote:

- More pythonic: how do I get the length in bytes of a unicode?
u = 'abc\N{comet}def}' (\N{comet} == \u2604)
len(u) = 7

length(u) in bytes ?

--
- Tim Roberts, timr@probo.com
  Providenza & Boeklheide, Inc.