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

Use the same filename conversion when loading and saving files. #135

Merged
merged 1 commit into from
Jan 8, 2021

Conversation

jpd236
Copy link
Contributor

@jpd236 jpd236 commented Dec 27, 2020

MyFrame::LoadPuzzle uses wx2file to convert wxString filenames to
std::string filenames suitable for use with native C++ APIs, but
MyFrame::DoSavePuzzle was using puz::encode_utf8(wx2puz(...)) which
appears to mangle accents on Windows. Use wx2file everywhere.

Also make line endings consistent so VS stops complaining.

Fixes #133

MyFrame::LoadPuzzle uses wx2file to convert wxString filenames to
std::string filenames suitable for use with native C++ APIs, but
MyFrame::DoSavePuzzle was using puz::encode_utf8(wx2puz(...)) which
appears to mangle accents on Windows. Use wx2file everywhere.

Also make line endings consistent so VS stops complaining.
@jpd236
Copy link
Contributor Author

jpd236 commented Dec 27, 2020

(Only tested on Windows at the moment, but doesn't seem like it should cause issues on Mac given that loading works fine there. LMK if you need me to check on Mac as well).

@mrichards42
Copy link
Owner

Works for me 👍

@mrichards42 mrichards42 merged commit 13c017e into mrichards42:master Jan 8, 2021
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

Successfully merging this pull request may close these issues.

Filename with accent corrupted on save
2 participants