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

Test case fails on cygwin - lack of wide path support #61

Open
jeking3 opened this issue Jul 18, 2018 · 2 comments
Open

Test case fails on cygwin - lack of wide path support #61

jeking3 opened this issue Jul 18, 2018 · 2 comments

Comments

@jeking3
Copy link
Contributor

jeking3 commented Jul 18, 2018

On cygwin, boost::filesystem uses wide character paths.
The mapped_file implementation in iostreams only supports this on Windows proper.
In cygwin it falls back to open() and there is no conversion code from the wide string that allows it to work. Since the built-in path object supports wide and not wide, mapped_file currently cannot file any file if the path is wide because the path string is empty.

https://github.com/boostorg/iostreams/blob/develop/src/mapped_file.cpp#L264

I disabled one of the mapped file tests only for CYGWIN to work around this. I was going to hook that code into boost::locale to leverage from_utf, but that creates a dependency that isn't currently there so I decided to open an issue for it instead.

@eldiener
Copy link
Contributor

AFAIK Windows supports both 8-bit character paths as ascii or multibyte characters and 16-bit character paths in the form of UTF16, while Linux supports 8-bit character paths in the form of UTF8. Why would boost::filesystem only support 16-bit character paths for cygwin ?

@jeking3
Copy link
Contributor Author

jeking3 commented Aug 19, 2018

Look at https://github.com/boostorg/iostreams/blob/develop/src/mapped_file.cpp#L267 - the code in iostreams is calling ::open directly, so if the path is wide coming into the code here, there's no way for it to succeed.

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

2 participants