Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
zakdo
Posts: 2 Joined: 2013-04-03T14:51:14-07:00
Authentication code: 6789
Post
by zakdo » 2013-04-03T15:12:52-07:00
Hi!
I am getting wrong output character when using caption with french accent. Example:
Code: Select all
@ECHO OFF
convert -background lightblue -fill blue -gravity center ^
-font "C:\Windows\Fonts\timesbd.ttf" ^
-size 292x208 caption:"Test With accent â ù é" ^
C:\Users\ZAK\Desktop\output.gif
results in:
(note we don't have "â ù é")
my convert version is:
Code: Select all
C:\Users\ZAK>convert --version
Version: ImageMagick 6.8.4-6 2013-04-01 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2013 ImageMagick Studio LLC
Features: DPC OpenMP
Delegates: bzlib fontconfig freetype jng jp2 jpeg lcms lzma pango png ps tiff x
xml zlib
Thx
magick
Site Admin
Posts: 11064 Joined: 2003-05-31T11:32:55-07:00
Post
by magick » 2013-04-03T15:23:24-07:00
Convert your text to UTF8 and make sure your font supports UTF8 encoding. We standardized on UTF8 because its supported both under Linux and Windows.
snibgo
Posts: 12159 Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK
Post
by snibgo » 2013-04-03T17:49:54-07:00
I find the Windows command processor usually mucks up commands containing UTF-8 text. I'm sure there is a workaround, but I don't know what it is.
Instead, I put the text in a file, saved as UTF-8, and "@" caption. Thus ...
Code: Select all
"%IMG%convert" -background lightblue -fill blue -gravity center ^
-font "C:\Windows\Fonts\timesbd.ttf" ^
-size 292x208 caption:@capt.txt ^
output.gif
... where capt.txt is a text file, saved with Notepad as UTF-8, containing:
anthony
Posts: 8883 Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia
Post
by anthony » 2013-04-04T17:02:34-07:00
Future...
In IMv7, the "magick" scripting will should not muck up UTF-8.
Using "magick" scripting should make IM scripts more portible between all machines as it avoids DOS or Shell script interpretations.
However there are quite a number of things that still needs to be added to make "magick-scripting" useful, such as script argument handling.
zakdo
Posts: 2 Joined: 2013-04-03T14:51:14-07:00
Authentication code: 6789
Post
by zakdo » 2013-04-22T06:09:25-07:00
Hi,
I solved my problem by using "chcp 1252" in DOS for converting to ANSI character :
Code: Select all
@ECHO OFF
chcp 1252
convert -background lightblue -fill blue -gravity center ^
-font "C:\Windows\Fonts\timesbd.ttf" ^
-size 292x208 caption:"Test With accent â ù é" ^
C:\Users\ZAK\Desktop\output.gif
Thanks