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

Bokor Márton <[email protected]>
Newsgroups gmane.comp.video.image-magick.bugs
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.