UTF-8 label with nconvert on windows

Discussions on NConvert - the command line tool for image conversion and manipulation

Moderators: XnTriq, helmut, xnview

Post Reply
fltcpt
Posts: 4
Joined: Sun May 27, 2018 6:52 am

UTF-8 label with nconvert on windows

Post by fltcpt »

I am a bit surprised I couldn't find any topic on this:
Can someone help out? I have a windows .bat file that has a -text option where the argument is a utf-8 string,
much like the one I pasted below, but when I run the converted image shows "??" instead of the string in utf-8..
I must be doing something wrong, it looks like other people have no problem with this. What is the correct way
to create .bat files that run nconvert and let it take non-ascii-7 characters

chcp 65001
"C:/Program Files (x86)/XnView/nconvert.exe" -npcd 2 -size 256x256+0 -ctype rgb -corder inter -text_flag bottom-right -text "some string in utf-8" image.jpg
User avatar
xnview
Author of XnView
Posts: 43377
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: UTF-8 label with nconvert on windows

Post by xnview »

currently nconvert use default charset, so a parameter to enter as utf8 need to be added
Pierre.
fltcpt
Posts: 4
Joined: Sun May 27, 2018 6:52 am

Re: UTF-8 label with nconvert on windows

Post by fltcpt »

Thanks so much for that answer, I look forward to option being added :)
fltcpt
Posts: 4
Joined: Sun May 27, 2018 6:52 am

Re: UTF-8 label with nconvert on windows

Post by fltcpt »

Is there any plan to add utf8 in the near future?
sartaros
Posts: 28
Joined: Tue Dec 14, 2010 11:21 am

Re: UTF-8 label with nconvert on windows

Post by sartaros »

Hi!

The utf-8 text is't not displayed in the XnView Comment window either

The png format specs :
PNG text strings are expected to use the Latin-1 character set. Encoders should avoid storing characters that are not defined in Latin-1, and should provide character code remapping if the local system's character set is not Latin-1
Alex
Post Reply