Page 1 of 1

Support unicode character

Posted: 2017-11-30T13:18:18-07:00
by torvald3d
I try to read "C:/ццц.cr2" image:

Code: Select all

Magick::Image image;
image.read(path);
where path is Unicode std::string but it failed with error:
C:/Р№Р№Р№.CR2: No such file or directory
I use English locale Windows, Qt 5.7.1 compiled MinGW-w64-i686. Magick++ aslo compiled by MinGW-w64-i686.
In Windows usually using wstring and _wfopen() instead fopen(), but Magick++ using only fopen() and string. So how to open image with Russian, Japanese and other characters in the path?

I've read
viewtopic.php?t=10342
viewtopic.php?t=20795
viewtopic.php?t=8106
but it did not help me

Re: Support unicode character

Posted: 2017-12-01T05:22:13-07:00
by snibgo
IM on Windows 8.1 copes happily with non-Latin characters in filenames, for example:

Code: Select all

convert rose: test\rццц.png
convert test\rццц.png r.png
What version of Windows are you on? You may need to do something in Windows to let it use non-Latin characters at the console.

Re: Support unicode character

Posted: 2017-12-01T16:10:59-07:00
by torvald3d
snibgo wrote: 2017-12-01T05:22:13-07:00 IM on Windows 8.1 copes happily with non-Latin characters in filenames, for example:

Code: Select all

convert rose: test\rццц.png
convert test\rццц.png r.png
What version of Windows are you on? You may need to do something in Windows to let it use non-Latin characters at the console.
Windows 10. Do you used Magic++ API (Image::read()) from C++ code with MinGW-64-i686 compiler?