> What about:
 > CHCP 65001

I should have mentioned that I had tried that, too. If you start a DOS 
box and simply type

CHCP 65001
convert label:äüö test.jpg

(i.e. supply three German umlauts) this will not work; test.jpg will 
contain no characters. If you however type

CHCP 65001
ECHO äüö>umlauts.txt
convert label:@umlauts.txt test.jpg

this will work.

Changing the codepage to 65001 will however produce numerous problems in 
DOS batchfiles when it come to pathnames, the output of DOS commands, 
etc. Therefore it's not the cure-all for codepage problems.


 > ImageMagick had numerous problems related to supporting the
 > various encodings available so we standardized on UTF-8.
 > This permits us to support all characters sets in a uniform
 > way.Convert your string to UTF-8 and the
 > label conversion should work properly.

The common Windows user will run into problems when the label text stems 
from a DOS command in a batch file. I took me about an hour and a half 
to find a command line tool which does this conversion.

The solution may seem trivial to a Unix / Linux user: There is a version 
of iconv for Windows which does the trick. I would therefore recommend 
to convert just the label string when needed and leave the codepage at 
the system default. The code in the batch will look something like this:


SET ICONV=C:\Programme\Gnuwin32\bin\iconv.exe -f ISO-8859-1 -t UTF-8
::
:: establish a FOR loop in %%a
...
::
ECHO %%a>temp.txt
%ICONV% temp.txt>title.txt
convert [email protected] %%a %%~na_lab%%~xa
....

I will adjust the example given at 
http://www.imagemagick.org/Usage/windows/#for_recursive in regard to that.

"ISO-8859-1" is Latin-1, i.e. Western Europe encoding and has to be 
adjusted for other codepages.

I rather think that there should be some announcement in the future when 
something basic like the codepage treatment is changed in ImageMagick. 
My script just didn't labelled correctly anymore. I think these changes 
were also the reason that the same script did not work under Windows 
2000: There was just a newer IM version on our server!

Wolfgang Hugemann


_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users
  • ... Wolfgang Hugemann
    • ... Michał Skalski
    • ... da . mihi . sis . bubulae . frustrum . assae . solana . tuberosa . in . modo . gallico . fricta . ac . quassum . lactatum . coagulatum . crassum
      • ... Wolfgang Hugemann
      • ... Glenn Linderman

Reply via email to