[vtkusers] VTK and Unicode

David Gobbi david.gobbi at gmail.com
Thu Jun 5 15:44:24 EDT 2014


Hi Maarten,

VTK just uses C++ streams in most of its readers/writers.  On OS X,
you'll find that you can use utf-8 filenames just fine.  Same for linux,
for the most part at least.

For Windows, you'd have to set the codepage to 65001 (utf-8).  I've
done this successfully for console I/O (via SetConsoleOutputCP()),
but you'll have to look through the Windows docs to see what function
is needed to change the codepage used by CreateFileA.

 - David


On Thu, Jun 5, 2014 at 1:17 PM, Maarten Beek <beekmaarten at yahoo.com> wrote:
> Hi all,
>
> I was wondering if there is a multi-platform way of loading a file (e.g.
> tif, stl) with chinese, russian characters in the file path in VTK.
> How would I build VTK with Unicode characters?
> Can I use a non-unicode VTK in a unicode app?
>
> Thanks - Maarten


More information about the vtkusers mailing list