Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please reinstate the stream macro #106

Closed
todoooo opened this issue Feb 24, 2021 · 3 comments
Closed

Please reinstate the stream macro #106

todoooo opened this issue Feb 24, 2021 · 3 comments

Comments

@todoooo
Copy link

todoooo commented Feb 24, 2021

Some time ago the METAIO_STREAM macro was removed from MetaIO and the new code, which uses std::ifstream/ofstream , breaks unicode compliance in VTK.
See https://gitlab.kitware.com/vtk/vtk/-/merge_requests/6716#note_908828

VTK uses vtksys::ifstream/ofstream to support utf8 path and filenames across all platforms, so please reinstate the macro to allow VTK to function correctly with non-English characters on Windows.

@codeling
Copy link
Contributor

Was the METAIO_STREAM ever something else than a pointer to std?
The vtksys::i/ofstream is a new development I believe?

I have tried to address (a limited subset of) this problem in #113, maybe you would have some comments on my attempted solution there?

@todoooo
Copy link
Author

todoooo commented Aug 10, 2022

What is needed is to replace Ifstream/iostream in METAIO with their vtksys equivalents, as has been done in VTK and Paraview e.g. https://gitlab.kitware.com/paraview/paraview/-/merge_requests/3850
The METAIO_STREAM macro can be used to achieve this for both VTK and ITK.

@aylward
Copy link
Collaborator

aylward commented Aug 11, 2022

+1

Wish it hadn't been removed. @hjmjohnson - do you recall the reason for removing it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants