UTF-8 text File

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
seans

UTF-8 text File

Post 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
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: UTF-8 text File

Post 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).
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
seans

Re: UTF-8 text File

Post by seans »

Thanks
Post Reply