ImageMagick Lacks Unicode Support??

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Locked
vimxts
Posts: 1
Joined: 2016-04-27T09:09:04-07:00
Authentication code: 1151

ImageMagick Lacks Unicode Support??

Post 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.

Jason S
Posts: 103
Joined: 2010-12-14T19:42:12-07:00
Authentication code: 8675308

Re: ImageMagick Lacks Unicode Support??

Post 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.

Locked