Unknown filename error when input contain cyrillic characters

I use gmic from windows command line, and i noticed when the image filename contain cyrillic characters, i get this error [gmic]-0./ *** Error *** Unknown filename

I have to rename the image. Is this a bug?
If someone have a solution for that it will be great !

I’m surprised. I think things have been done to make G’MIC with UTF-8 filenames.
What version of G’MIC do you use ?

I am using the version 2.9.4.

I also noticed the same error when the cyrillic characters are in the full path of the input, like in my windows user name for example.
But if the cyrillic characters are in the output file, it works fine without any error.

I attached the screenshots of both cases.

Try setting Windows to use UTF-8.

The option can be found by typing intl.cpl.



Restart Windows.

Thank you afre and CarVac, this solution fixed the issue.
But i hope for another solution from Gmic if possible.

Honestly, I don’t know how to deal with that.
It seems the Windows console is broken by design, by not supporting UTF-8 by default.

If someone has idea on how to make this work on Windows, I guess that looking at the function cimg::fopen() in file CImg.h is a good starting point.

The original Windows console exists primarily for backwards compatibility, UTF-8 did not exist when MS-DOS was written. :smiley:
Microsoft is working on a new Windows Terminal application that does support UTF-8 and other modern features, unfortunately it is Windows 10 only and not installed by default.

The console character encoding has to be set before launching the gmic process, so the instructions in the above posts are the best method that I know of.

1 Like

Not an answer, but I use only Latin characters and numbers in filenames. Special/foreign, even Chinese, Japanese, Korean mostly work, but I am never sure they can work on all computers, so I change them.

It’s annoying enough to work with it in MySQL, PHP etc. where there is no workaround.

Yes, leetspeak your way around Windows. :stuck_out_tongue_closed_eyes:

PS ヽ(`Д´)ノ︵ ┻━┻

1 Like