Cyrillics

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?".
Post Reply
lorents
Posts: 42
Joined: 2010-07-06T04:27:53-07:00
Authentication code: 8675308

Cyrillics

Post by lorents »

How to make, that ImageMagick understood кириллицй in ways and in names of files?
jpiquemal
Posts: 54
Joined: 2003-12-07T01:57:19-07:00

Re: Cyrillics

Post 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;
}
lorents
Posts: 42
Joined: 2010-07-06T04:27:53-07:00
Authentication code: 8675308

Re: Cyrillics

Post by lorents »

Thanks, and it is possible to make it through a batch-file?
jpiquemal
Posts: 54
Joined: 2003-12-07T01:57:19-07:00

Re: Cyrillics

Post by jpiquemal »

do you mean in a .bat ?
(it will not work in a .bat)
lorents
Posts: 42
Joined: 2010-07-06T04:27:53-07:00
Authentication code: 8675308

Re: Cyrillics

Post by lorents »

Yes in *.bat.
Here it is bad that it does not work through *.bat
How I understand, it works through UTF8?
Post Reply