I’m working on a string processing library, and I just got a way to map cli inputs into their expected value as G’MIC internally use unicode (it seems so) as I check how input are translated. Or maybe it’s translating to Windows-1251 for non-cli context in some cases.
For Windows, I got it to work:
Use this exec instead for Windows
But, how? I did it this way because G’MIC exec can only return numbers. I’ll add more charmaps. Not sure what else I can add, as my main targets are US/Europe/Latin America.
Both Bash parts look OK to me, be it the case-based strategy or the associative-array-based one.
Technically exit codes are not really used for that kind of stuff (basically anything ≠0 is for errors), but I guess you’re in a weird context anyway, so…