[Magick-bugs] Reading EMF files containing non-ascii characters failed for UTF8 encoded paths on Windows XP

Bokor Márton marton.bokor at gfthu.com
Wed Jun 4 03:29:27 PDT 2008


I have found the following bug when using Jmagick with ImageMagick:

Reading EMF files containing non-ascii characters failed for UTF8 encoded paths on Windows XP:

 

possible fix:

 

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?

 

 

This temporary fix does not address compatibility issues. Probably need to be applied with MAGICKCORE_HAVE__WFOPEN define. (Also posted to dev-list)

 

 

 

Best Regards,

 

Marton Bokor

 



More information about the Magick-bugs mailing list