Convert UTF-8 textfile runtime bug
Posted: 2018-12-06T20:24:40-07:00
I have a text file with contents as follows:
LINE 1
LINE 2
LINE 3
This file is saved as Normal.TXT (normal ANSI text file) and UTF8.TXT (UTF-8 format text file).
I ran the following commands:
convert -background white -fill black -font simhei -pointsize 60 -size 3020x caption:@Normal.TXT Output1.JPG
convert -background white -fill black -font simhei -pointsize 60 -size 3020x caption:@UTF8.TXT Output2.JPG
The first convert works fine, as expected.
The second convert has an unexpected problem. Output as follows:
LINE1
LINE2
LINE3
As you can see, LINE1 has been offset.
Anyone has any ideas how to fix this so that Output2 looks exactly like Output1? I need UTF-8 support because I need to support Chinese characters. Please help.
LINE 1
LINE 2
LINE 3
This file is saved as Normal.TXT (normal ANSI text file) and UTF8.TXT (UTF-8 format text file).
I ran the following commands:
convert -background white -fill black -font simhei -pointsize 60 -size 3020x caption:@Normal.TXT Output1.JPG
convert -background white -fill black -font simhei -pointsize 60 -size 3020x caption:@UTF8.TXT Output2.JPG
The first convert works fine, as expected.
The second convert has an unexpected problem. Output as follows:
LINE1
LINE2
LINE3
As you can see, LINE1 has been offset.
Anyone has any ideas how to fix this so that Output2 looks exactly like Output1? I need UTF-8 support because I need to support Chinese characters. Please help.