Page 1 of 1

How do you guys pass UTF-8 parameters in a DOS call?

Posted: 2010-03-19T07:14:29-07:00
by alexeiramone
I never managed to make this work.. I need to call the executables and convert unicode parameters. If I pass the string "Some Brazilian word like coração" it crops the text right before the ç. The reason is convert uses UTF8 and dos use codepages. How do I make this work?

Re: How do you guys pass UTF-8 parameters in a DOS call?

Posted: 2010-03-19T07:36:38-07:00
by magick
What version of ImageMagick are you using? The current release is ImageMagick 6.6.0-7 and has a patch to accept non-UTF-8 text.

Re: How do you guys pass UTF-8 parameters in a DOS call?

Posted: 2010-03-19T11:22:26-07:00
by alexeiramone
Hmmmmmmmmm i didn't see that in docs.... i tried with an older version but i just downloaded a new one this week. Lemme retry.

Re: How do you guys pass UTF-8 parameters in a DOS call?

Posted: 2010-03-19T11:58:45-07:00
by alexeiramone
OH great. This new version hangs, it's not working anymore, even calling convert from DOS it simply hangs. Windows Server 2003 Standard SP1.

Here's the command that used to work...

convert background red -fill black -font arial -kerning -1 -size 190x146 -pointsize 18 -interline-spacing -2 caption:"Créu" "C:\folder\whatever\magick.png"

Re: How do you guys pass UTF-8 parameters in a DOS call?

Posted: 2010-03-19T12:05:45-07:00
by fmw42
convert background red -fill black -font arial -kerning -1 -size 190x146 -pointsize 18 -interline-spacing -2 caption:"Créu"
You left off the minus sign before -background

convert -background red -fill black -font arial -kerning -1 -size 190x146 -pointsize 18 -interline-spacing -2 caption:"Créu" tmp.png

works fine for me in IM 6.6.0-7 Q16 Mac OSX Tiger

Re: How do you guys pass UTF-8 parameters in a DOS call?

Posted: 2010-03-19T12:07:57-07:00
by alexeiramone
Sorry about the minus sign i forgot, just a copy+paste issue but thanks for pointing that out :-)

This WORKS
convert -background red -fill black -font arial -kerning -1 -size 190x146 -pointsize 18 -interline-spacing -2 caption:Test test.png

THIS DOESN'T (HANGS)
convert -background red -fill black -font arial -kerning -1 -size 190x146 -pointsize 18 -interline-spacing -2 caption:Ação test.png

I didn't find the Patch you talked about.... plus, it's not supposed to HANG just because you have a different character

Re: How do you guys pass UTF-8 parameters in a DOS call?

Posted: 2010-03-19T12:11:08-07:00
by fmw42
convert -background red -fill black -font arial -kerning -1 -size 190x146 -pointsize 18 -interline-spacing -2 caption:Ação tmp.png

works just fine for me. What version of IM are you using?


see http://www.imagemagick.org/script/binar ... hp#windows

Re: How do you guys pass UTF-8 parameters in a DOS call?

Posted: 2010-03-19T12:21:47-07:00
by alexeiramone
The very latest, I just downloaded it today.

C:\>convert -version
Version: ImageMagick 6.6.0-7 2010-03-16 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2010 ImageMagick Studio LLC
Features: OpenMP

Windows 2003 standard SP1

Thanks in advance

Re: How do you guys pass UTF-8 parameters in a DOS call?

Posted: 2010-03-19T12:25:54-07:00
by fmw42
OK. Sounds like a possible bug (or faulty install) in the Windows version of this release. Suggest you post a note to the bugs forum and refer back to this topic.

Re: How do you guys pass UTF-8 parameters in a DOS call?

Posted: 2010-03-19T12:27:01-07:00
by fmw42
one last thing to try. try putting your text in quotes or double quotes

onvert -background red -fill black -font arial -kerning -1 -size 190x146 -pointsize 18 -interline-spacing -2 caption:"Ação" tmp.png

see if that makes a difference

Re: How do you guys pass UTF-8 parameters in a DOS call?

Posted: 2010-03-19T12:30:36-07:00
by alexeiramone
No, i didn't work. I'll move this to the BUG section, thanks for the help.

Re: How do you guys pass UTF-8 parameters in a DOS call?

Posted: 2010-03-19T12:33:51-07:00
by magick
We can reproduce the problem and will have a patch in ImageMagick 6.6.0-8 Beta within a day or two. Thanks.

Re: How do you guys pass UTF-8 parameters in a DOS call?

Posted: 2010-03-19T12:34:27-07:00
by fmw42
Withdrawn as Magick has confirmed the bug