Support unicode character

Magick++ is an object-oriented C++ interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning Magick++.
Post Reply
torvald3d
Posts: 2
Joined: 2017-11-30T13:05:18-07:00
Authentication code: 1152

Support unicode character

Post 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
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Support unicode character

Post 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.
snibgo's IM pages: im.snibgo.com
torvald3d
Posts: 2
Joined: 2017-11-30T13:05:18-07:00
Authentication code: 1152

Re: Support unicode character

Post 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?
Post Reply