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

Support for special characters in paths on Windows #3110

Closed
ahabersaat opened this issue Jan 9, 2025 · 1 comment
Closed

Support for special characters in paths on Windows #3110

ahabersaat opened this issue Jan 9, 2025 · 1 comment

Comments

@ahabersaat
Copy link

ahabersaat commented Jan 9, 2025

Is your feature request related to a problem?

Hey,
I'm trying to create a small executable to add some defined XMP tags to some images on Windows 11. Before, I remember that I once used to use a self-compiled version from the main branch from a few years ago and it was working fine, with the EXIV2_ENABLE_WIN_UNICODE flag and it was compiling out of the box.
However now I'm trying to update the library but it fails to tag as soon as the path of the image contains special characters (e.g. japanese, arabic, hebrew, chinese, etc).

  • I tried the latest 0.28 build for Windows, but it does not work.
  • I tried the latest 0.27.7 build for Windows, but it fails as well, the build does not seem to have the EXIV2_ENABLE_WIN_UNICODE flag set.

I'm using Qt to call the library. In the past, I had:
Exiv2::Image::AutoPtr exiv2Image = Exiv2::ImageFactory::open(fileInfo.absoluteFilePath().toStdWString());
Now I'm trying with:
Exiv2::Image::AutoPtr exiv2Image = Exiv2::ImageFactory::open(fileInfo.absoluteFilePath().toUtf8().toStdString());
but without success as std::fopen() does not support UTF-8 on Windows.

I spent hours checking the code and the git history, and it looks like this feature has just been dropped at some point in 0.28, making the library no longer support Unicode on Windows, is this correct or did I miss something ?

Now I'm trying to build the 0.27.7 from the source with the flag EXIV2_ENABLE_WIN_UNICODE set to restore the functionality, but it has new dependencies to libexpat and requires conan1 while I have conan2, so I need to migrate it to build and it seems quite difficult.

Describe the solution you would like

Could the Windows build have the flag EXIV2_ENABLE_WIN_UNICODE set by default to support Unicode ?

Alternative solutions

Would it be possible to tag the image in memory with Exiv, and but read and write the file with Qt (which fully supports Unicode on Windows) ?

Desktop

  • Windows 11 with MSVC 2019.
  • Exiv2 0.27.7
  • Qt 6.6.0
@ahabersaat ahabersaat added the request feature request or any other kind of wish label Jan 9, 2025
@kmilos
Copy link
Collaborator

kmilos commented Jan 9, 2025

@kmilos kmilos closed this as not planned Won't fix, can't repro, duplicate, stale Jan 9, 2025
@kmilos kmilos removed the request feature request or any other kind of wish label Jan 9, 2025
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