how to -draw text with special character -like ë- ?

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
silversonicaxel
Posts: 10
Joined: 2013-12-19T07:00:20-07:00
Authentication code: 6789

how to -draw text with special character -like ë- ?

Post by silversonicaxel »

Hi guys,
I would like to draw some special characters on my image, but the letter ë in Azië is represented with wrong coded characters.
actually i wrote my script on a *.bat UTF8 encoded file.
Is there a way to solve it?

this is my example code:

Code: Select all

-draw "rotate -4 text 385,335 'Azië'"
thanks in advance
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: how to -draw text with special character -like ë- ?

Post by snibgo »

In Windows 8.1 we can just paste the command with UTF into the command line. Hoorah. At long last, Microsoft is getting somewhere near the 21st century.

But their BAT processing is stuck in the 1970s. The IM commands "annotate" and "caption" can take text from a file. So can "draw", but it has to be the entire draw options.

So, paste this into Notepad:

Code: Select all

rotate -4 text 385,335 'Azië'
Save as anything.txt in normal (ANSI) encoding.
Now issue the command from the command window or bat file, eg:

Code: Select all

convert -size 400x400 xc: -fill black -pointsize 20 -draw @anything.txt r.png
snibgo's IM pages: im.snibgo.com
Post Reply