Page 1 of 1

ImageMagick Lacks Unicode Support??

Posted: 2016-04-27T09:19:53-07:00
by vimxts
I'm using gm (a node JS library that can trigger GraphicsMahick and ImageMagick commands: http://aheckmann.github.io/gm/docs.html) and I'm experiencing the problem where I can't read filenames containing Chinese characters in Unicode, but I assume it can read Latin alphabets in Unicode, because some commands were passed through a web file encoded in UTF-8. I have to stress that I am not an expert in programming.

This is how the problem occur:
- Platform: Win10
- Installed version: ImageMagick-6.9.3-8-Q16-x64-dll.exe
- Problem persists with Command Prompt and Command Prompt inside Powershell.
- Command:

Code: Select all

convert -encoding unicode -identify 獅藝學會.jpg
I also have to clarify that I'm pretty sure that the "encoding" option is not supposed to be used this way.

This is what the Command Prompt returns exactly (it may contain 2 transparent Unicode characters):

Code: Select all

convert.exe: no images defined `獅藝學會.jpg' @ error/convert.c/ConvertImageCommand/3252.

Re: ImageMagick Lacks Unicode Support??

Posted: 2016-04-27T18:16:55-07:00
by Jason S
convert requires an output file, even with the -identify option. If you don't want that, try

Code: Select all

convert.exe 獅藝學會.jpg info:
or

Code: Select all

identify.exe 獅藝學會.jpg
ImageMagick on Windows can handle Unicode filenames on the command line. However, it does not correctly print Unicode to the console, so the filenames are garbled when it prints them.