[magick-developers] Possible fix for emf reader
Bokor Márton
marton.bokor at gfthu.com
Wed Jun 4 03:03:34 PDT 2008
Hi all, I have made a temporary fix for the following bug:
Reading EMF files containing non-ascii characters failed for UTF8 encoded paths on Windows XP:
diff:
- - - - old
hTemp=GetEnhMetaFile(szFileName);
- - - - -- - - - - - - - - - -- - - - new
wchar_t *unicode_path;
.
.
.
unicode_path = ConvertUTF8ToUTF16(szFileName);
hTemp=GetEnhMetaFileW(unicode_path);
unicode_path=(wchar_t *) RelinquishMagickMemory(unicode_path); //???? is this needed?
Note, I don't know if this spoils other cases, or if it is correct at all in general, but it definetely solved our very urgent problem. Please, if this fix is correct commit the normalized version to trunk, so I can check out the correct fix. I hope this contribution was useful and I'm adressing the correct forum, If not please tell me how and where to do it.
Best Regards,
Marton Bokor
More information about the Magick-developers
mailing list