[vtk-developers] Python 3 and unicode

Ben Boeckel ben.boeckel at kitware.com
Mon Aug 24 11:10:39 EDT 2015


On Mon, Aug 24, 2015 at 08:48:54 -0600, David Gobbi wrote:
> On Windows, kwsys and most IO classes still do filesystem operations using
> the local 8-bit encoding.  Which is silly, I know, considering that Windows
> provided unicode APIs 22 years ago. But I don't see anyone volunteering to
> fix this, which means that, right now, some people will have to use
> encodings other than utf-8 for their filenames.

FWIW, POSIX filenames are arbitrary bytestrings, so it's not
*technically* different there either. And there's no indication or place
to query what encoding should be used either since it's more a property
of the one who wrote the file than the one who is reading it (so LANG
might not help).

In any case, won't just handing over raw bytes for invalid utf-8
sequences be fine at that point (if we tried to normalize, I could see a
problem though)?

--Ben


More information about the vtk-developers mailing list