How does wstring support work for Exiv2::ImageFactory::open()?
Added by Mikayel Egibyan over 5 years ago
Hi,
I saw a discussion(http://dev.exiv2.org/boards/3/topics/1245?r=1248#message-1248) from a long ago. I assume this should be already in the 0.25, since image.hpp documents it.
When I try following:
char * blah = "path";
wstring blah_w;
convertUTF8toUTF16(blah, blah_w);
Exiv2::ImageFactory::open(blah_w);
I get warnings and an error saying:
error C2665: 'Exiv2::ImageFactory::open' : none of the 3 overloads could convert all the argument types
Is this a bug, or am do I need to specify something else?
Thanks!
Mikayel
Replies (6)
RE: How does wstring support work for Exiv2::ImageFactory::open()? - Added by Mikayel Egibyan over 5 years ago
UPDATE:
I have also tried Exiv2::ImageFactory::open(blah_w.data());
Mikayel
RE: How does wstring support work for Exiv2::ImageFactory::open()? - Added by Robin Mills over 5 years ago
Mikayel
You have to build Exiv2 to support wstring paths. You set the flag EXV_UNICODE_PATH in exc_msvc.h.
I'll be honest, I've never built this because all our test applications require modification to work with wstring paths. Qt Applications normally use 16bit strings for paths and I believe it works. Here's a discussion I had in November with somebody about this. http://dev.exiv2.org/boards/3/topics/2311
RE: How does wstring support work for Exiv2::ImageFactory::open()? - Added by Robin Mills over 5 years ago
Mikayel
There was an issue raised about this some time ago. That issue has been closed: http://dev.exiv2.org/issues/851
In response to topic 2311 I logged issue #1169 to validate our support for EXV_UNICODE_PATH. If you'd like to work on #1169, I will mentor you.
Robin
RE: How does wstring support work for Exiv2::ImageFactory::open()? - Added by Robin Mills over 5 years ago
Mikayel
#1169 Fix submitted: r4282 and r4283 I've submitted changes to samples/exifprint.cpp to respect EXV_UNICODE_PATH.
Perhaps you could let me know if this is working OK for you as I believe you are more involved with UNICODE paths. As a native English speaker, I really don't know how to create honest/genuine unicode paths.
Robin
RE: How does wstring support work for Exiv2::ImageFactory::open()? - Added by Mikayel Egibyan over 5 years ago
Robin,
Your updates in exv-mvsc.h worked for me.
Thanks much! You are as always super helpful.
Mikayel
RE: How does wstring support work for Exiv2::ImageFactory::open()? - Added by Robin Mills over 5 years ago
Thanks, Mikayel. Can I ask you to always let me know if something works (or doesn't work) because it lets me forget (or do more work) on your issue.
The house project is moving forward. We hoped to finish at the end of May. It has slipped yet another one month. We'll be done for a big family gathering on Sunday July 10 (Alison's birthday)