Wide String Support for VTK Writers

In VTK 8, vtkDataWriter::SetFileName() accepts only normal strings and vtkDataWriter::OpenVTKFile() uses ofstream to open the output file for writing. Is there a plan to add wide-character support to these methods in the future?

VTK already uses UTF-8 encoding for strings for all its public APIs. Since UTF-8 codepage is available now on all major operating systems, there should be no reason to use fixed wide strings in applications.

1 Like

VTK 8.2+ no longer uses std::ofstream/ifstream. It uses vtksys::ofstream/ifstream which makes the software unicode compliant. When crossing the DLL boundary users are expected to pass string/char* method parameters using utf8 encoding and text results are returned with utf8 encoding.

The Python and Java wrappers already have this conversion built into their string types.