Page 1 of 1

Cyrillics

Posted: 2010-07-10T05:34:21-07:00
by lorents
How to make, that ImageMagick understood кириллицй in ways and in names of files?

Re: Cyrillics

Posted: 2010-07-10T22:51:29-07:00
by jpiquemal
Hello

If you use Windows, 'translate' the name:

char *translateUnicode(WCHAR *filename) {
int size;
char *translated;

size = WideCharToMultiByte(CP_UTF8, 0, filename, wcslen(filename), NULL, 0, NULL, NULL);
translated = (char*)HeapAlloc(GetProcessHeap(), 0, (size+1));
WideCharToMultiByte(CP_UTF8, 0, filename, wcslen(filename), translated, size, NULL, NULL);
translated[size]='\0';
return translated;
}

Re: Cyrillics

Posted: 2010-07-10T23:56:20-07:00
by lorents
Thanks, and it is possible to make it through a batch-file?

Re: Cyrillics

Posted: 2010-07-11T00:25:54-07:00
by jpiquemal
do you mean in a .bat ?
(it will not work in a .bat)

Re: Cyrillics

Posted: 2010-07-11T01:15:29-07:00
by lorents
Yes in *.bat.
Here it is bad that it does not work through *.bat
How I understand, it works through UTF8?