[vtkusers] VTK 6.1 no longer supports ASCII characters > 128? (5.10.1 was ok)

David Gobbi david.gobbi at gmail.com
Wed Jan 21 17:45:27 EST 2015


On Wed, Jan 21, 2015 at 3:16 PM, Sean McBride <sean at rogue-research.com>
wrote:

> On Wed, 21 Jan 2015 15:26:14 -0500, Serge Lalonde said:
>
> >Unfortunately, the writers (and probably the readers) still use fopen()
> >in the internal code which can't handle UTF-8 encoded filenames.
>
> Using fopen() isn't a problem.
>
> The question is: what character encoding does fopen() expect?  Remember,
> it's char* parameter tells us _nothing_ about the expected encoding, it
> could expect ASCII, Latin1, UTF-8, UTF-16, or anything else.  Only the
> documentation can tell us.  And it could expect different things on
> different platforms. :(
>
> On probably all modern UNIX variants, it expects UTF-8.  On Windows, it
> might expect something else, you'd have to check Microsoft's docs.
>

On Windows it depends on the country where you bought your copy of Windows.
It can be configured, too, but hardly anyone does that.

Windows provides UTF-16 variants for all functions, e.g. _wfopen().  In
order to properly
support Unicode on Windows, VTK should be using an adapter function that
converts
UTF-8 to UTF-16 and then calls _wfopen().  On UNIX, the adapter should
ideally check
the locale and do conversion if necessary.

 - David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150121/0d1dd738/attachment.html>


More information about the vtkusers mailing list