I discovered a bug where special filenames are not being handled properly.
If you try converting the attached file, you will get an imagemagick exception saying the
file does not exist. Remove the special characters (norwegian), and it works.
After a quick investigation i noticed that wide strings are not properly converted in Marshaller.cpp.
Patch:
Include: #include <codecvt>
```
// convert utf16 to utf8
std::wstring_convert<std::codecvt_utf8<wchar_t>> converter;
const wchar_t* chars = (const wchar_t*)(Marshal::StringToHGlobalUni(value)).ToPointer();
unmanagedValue = converter.to_bytes(chars);
```
Strange that anyone has not already filed a bug report regarding this since unicode filenames are pretty common nowadays ;)
Comments: ** Comment from web user: petersunde **
If you try converting the attached file, you will get an imagemagick exception saying the
file does not exist. Remove the special characters (norwegian), and it works.
After a quick investigation i noticed that wide strings are not properly converted in Marshaller.cpp.
Patch:
Include: #include <codecvt>
```
// convert utf16 to utf8
std::wstring_convert<std::codecvt_utf8<wchar_t>> converter;
const wchar_t* chars = (const wchar_t*)(Marshal::StringToHGlobalUni(value)).ToPointer();
unmanagedValue = converter.to_bytes(chars);
```
Strange that anyone has not already filed a bug report regarding this since unicode filenames are pretty common nowadays ;)
Comments: ** Comment from web user: petersunde **
Thanks for fixing this. What release cycle are you aiming at?