Quantcast
Channel: magick Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 1011

Commented Issue: Bug reading filenames with special characters [1007]

$
0
0
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: dlemstra **

I will try to publish a release this weekend. I have some other changes I want to include in the next release, and because this is a project I have to do in my spare time I won't be able to publish a release earlier.


Viewing all articles
Browse latest Browse all 1011

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>