Use vtksys::ifstream and vtksys::ofstream
This updates the classes that previously used <fstream>
so that they instead use vtksys::ifstream
and vtksys::ofstream
. This is for compatibility with vtk!6301.
The use of the vtksys:: APIs for system calls allows control of the Windows character set encoding via the CMake variable KWSYS_ENCODING_DEFAULT_CODEPAGE. Setting this CP_UTF8 causes vtksys to use utf-8 encoding for filenames.
Note that not all IO is done via ifstream/ofstream, so as it stands this commit is an incomplete solution. Follow-ups commits should be added which do the following:
-
when C files are used, replace fopen() with vtksys::SystemTools::Fopen().
-
when a third-party IO library is used, if a 'std::wstring' or 'wchar_t' API is available, then use vtksys to encode/decode the filename.