[vtkusers] Can VTK be built for UNICODE in visual studio 2013 C++?

Andy Chen zchenandy at gmail.com
Wed Jun 10 19:25:53 EDT 2015


Hi, David, Just want to let you know I have compiled the vtk 6.2.0 for
unicode. It took me a while to change my old code which is for vtk version
5 to work with vtk version 6.

I am disappointed to see the version 6  performance in term of speed is
much poor than version 5. My code is similar and only changed as required
by version 6. I thought it should be an improvement but....  Anyhow, thank
you for your time to answer my question. I only made up my mind to go
forward to change the source code. My source code can be shared if anyone
needs it,

Andy

On Sun, Jun 7, 2015 at 3:59 PM, David Gobbi <david.gobbi at gmail.com> wrote:

> In general, no.  To be more specific:
>
> 1) The vtk examples all use "main" instead of "wmain", therefore the
> program arguments use the Windows 8-bit codepage rather than unicode.
>
> 2) When VTK does system calls (opening/closing files etc) it does one of
> three things, depending on exactly what VTK class is using the file:
> a) some classes use the non-"wide" system calls, i.e. 8-bit all the way
> through
> b) some classes use kwsys, which for the most part converts 8-bit strings
> to Windows unicode and then calls the "wide" system methods
> c) some classes open files with a third-party library, e.g.  libjpeg jpeg
> files or libpng for png files, and I'm not sure what those third-party
> libraries do under-the-hood.
>
>
> I think it would be nice if VTK, as a rule, always used either utf-8
> strings or vtkUnicodeString internally, and always used "wide" system calls
> on Windows, with automatic conversion between utf-8 and Windows unicode
> whenever necessary.  That's still a ways off, though.  It would be a
> sizeable job for anyone to implement and test this.
>
>  - David
>
>
> On Sun, Jun 7, 2015 at 12:14 PM, Andy Chen <zchenandy at gmail.com> wrote:
>
>> Hello,
>>
>> Can anyone please let me know the answer?  I mean compile and build as it
>> is.
>>
>> Thanks for your help in advance.
>>
>> Andy
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150610/ff10cae4/attachment.html>


More information about the vtkusers mailing list