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

[Windows] load image with filenames other than english #7435

Open
wants to merge 82 commits into
base: master
Choose a base branch
from

Conversation

dimitre
Copy link
Member

@dimitre dimitre commented Mar 26, 2023

The idea behind this PR is to use std::filesystem::path object to store the filename until right up the freeimage function is called. FreeImage has some special functions to handle wstring, so they are called for windows, conserving original encoding.

@dimitre dimitre marked this pull request as ready for review March 26, 2023 19:53
@dimitre
Copy link
Member Author

dimitre commented Mar 26, 2023

Hey @oxillo please check this PR when you have the time. I don't know much about windows but I've tried to fix path encodings there, it seems to be working.

@dimitre
Copy link
Member Author

dimitre commented Mar 26, 2023

PS: there is a test there meant to be removed before merge

@dimitre
Copy link
Member Author

dimitre commented Dec 6, 2023

I've finally got a windows machine and some time to advance on this PR and test.
I think it is good to merge.
It addresses encoding issues loading files, and with the title in open file dialog box.
I think the only controversial change here is the return type change in of::filesystem::path ofFileDialogResult::getName() and ofFileDialogResult::getPath()

opinions are welcome @ofTheo @oxillo @artificiel @openframeworks/windows

@dimitre dimitre requested a review from ofTheo December 20, 2023 14:31
@dimitre dimitre changed the title Windows - load image with filenames other than english [Windows] load image with filenames other than english May 13, 2024
@dimitre
Copy link
Member Author

dimitre commented May 13, 2024

Hello @ofTheo I think this one is good to go.
Resolves a dread windows problem where you cannot load files in ofSystemLoadDialog with any accentuation and pass correctly to load an ofImage.

There is a test here:
https://github.com/dimitre/ofTests/tree/main/WinEncoding

#7435 (comment)

@dimitre
Copy link
Member Author

dimitre commented Jul 28, 2024

@danoli3 can you double check this one if you have the time?
btw, thanks for the other windows PR merging, OF is almost ready to work with multiple languages

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

Successfully merging this pull request may close these issues.

4 participants