Page 1 of 1

UTF-8 text File

Posted: 2008-06-13T11:46:51-07:00
by seans
I have an excel file with a column of 100 Chinese phrases from which I need to write out onto individual images and I'm having problems creating the individual text files to the same spec as the example shown on the website (ie UTF-8, no newline):

http://www.imagemagick.org/Usage/text/#unicode

".. we can create a Chinese label (using a Chinese true-type font), by reading a UTF-8 encoded chinese text file (without a final newline in the file)."

I can run my process using the example file without a problem.

Could anyone give me advice on how I might produce the text file in the correct format for ImageMagick to create the correct outputs?

Thanks in advance,
Sean

Re: UTF-8 text File

Posted: 2008-06-14T21:26:15-07:00
by anthony
It is just a plain text file. Or in a script you can extract the text and 'pipe' the unicode into the IM command. The text would already be in unicode so you will not need to convert 'unicode codes' into UTF-8 strings which is what the later examples are doing (using printf from shell or perl).

Basically your Unicode is already in the right format, just feed it into IM (without a final newline).

Re: UTF-8 text File

Posted: 2008-06-15T00:13:02-07:00
by seans
Thanks