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 code should properly handle unicode strings on Windows #286

Open
martinweismann opened this issue Nov 30, 2021 · 0 comments
Open

Test code should properly handle unicode strings on Windows #286

martinweismann opened this issue Nov 30, 2021 · 0 comments

Comments

@martinweismann
Copy link
Member

inline std::vector<Lib3MF_uint8> ReadFileIntoBuffer(std::string sFileName)
inline void WriteBufferToFile(std::vector<Lib3MF_uint8> const & buffer, std::string sFileName)
see

inline std::vector<Lib3MF_uint8> ReadFileIntoBuffer(std::string sFileName)

inline void WriteBufferToFile(std::vector<Lib3MF_uint8> const & buffer, std::string sFileName)

both assume the input strings to be UTF-8. However, they only run properly on Linux, if the string is outside the ASCII-range.
We need to add proper platform independent handling, e.g. like in

m_Stream.open(sFileName.c_str(), std::ios::in | std::ios::binary);

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

1 participant