Smaller problems with Edit Comment

*** Please report new bugs here! ***

Moderators: helmut, XnTriq, xnview, Dreamer

Post Reply
herb
Posts: 281
Joined: Sat Jul 18, 2009 3:19 pm

Smaller problems with Edit Comment

Post by herb »

Hello Pierre,

(1)
XnViewMP has the feature to store some text in file descript.ion.
With menu Edit -> Edit Comment the "Edit Comment" window is opened. In field "description" the text has to be entered.
This info is displayed in "Information" window - Properties - File - Annotation.
I would like to propose to use identical words for this field.

And sometimes I found some unprintable characters at end of last line in this file.

(2)
In case of the field Comment (stored inside a *.jpg file) contains a NEWLINE (0x0A0D = \r\n) its value is displayed with 2 NEWLINE in "Edit Comment" window. I guess one for \r and one for \n

Thanks in advance
Herb
User avatar
xnview
Author of XnView
Posts: 46235
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Smaller problems with Edit Comment

Post by xnview »

herb wrote: Sun Nov 24, 2019 6:42 pm XnViewMP has the feature to store some text in file descript.ion.
With menu Edit -> Edit Comment the "Edit Comment" window is opened. In field "description" the text has to be entered.
This info is displayed in "Information" window - Properties - File - Annotation.
I would like to propose to use identical words for this field.
Annotation is best?
And sometimes I found some unprintable characters at end of last line in this file.
At the end of descript.ion?
In case of the field Comment (stored inside a *.jpg file) contains a NEWLINE (0x0A0D = \r\n) its value is displayed with 2 NEWLINE in "Edit Comment" window. I guess one for \r and one for \n
NEWLINE was written by XnViewMP?
Pierre.
herb
Posts: 281
Joined: Sat Jul 18, 2009 3:19 pm

Re: Smaller problems with Edit Comment

Post by herb »

Hello Pierre,

sorry for my late reply.

(1)
In case of I see "unprintable" characters in file desript.ion they are stored at end of file - this means at end of last line of file descript.ion.

(2) ad annotation
In window "EditComment" the field is called: Embedded Comment
In Info panel - properties this embedded comment is shown as "annotation".

I stored the following in field Embedded Comment: <unicode-character> NEWLINE <unicode-character>.
In Info panel - properties annotation contains only <unicode-character>
In info panel - Exiftool displays the value properly -but with NEWLINE displayed as 1 dot.
- That NEWLINE is displayed as dot is an Exiftool feature.
- But because we have only 1 dot, it is clear that XnViewMP writes only LF (line-feed) or CR (carriage return).

In case the comment field inside th image contains LFCR as NEWLINE - which is default on Windows systems - XnViewMP shows 2 NEWLINE inside field EmbeddedComment.

Do we need an option to define whether XnViewMP writes NEWLINE as CR, as LF or as CRLF ?

I hope I have described all detailed enough.

Best regards
herb
User avatar
xnview
Author of XnView
Posts: 46235
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Smaller problems with Edit Comment

Post by xnview »

'Annotation' is best to use anywhere?
herb wrote: Sat Dec 21, 2019 12:04 pm In case of I see "unprintable" characters in file desript.ion they are stored at end of file - this means at end of last line of file descript.ion.
how do you reproduce?
(2) ad annotation
In window "EditComment" the field is called: Embedded Comment
In Info panel - properties this embedded comment is shown as "annotation".

I stored the following in field Embedded Comment: <unicode-character> NEWLINE <unicode-character>.
In Info panel - properties annotation contains only <unicode-character>
In info panel - Exiftool displays the value properly -but with NEWLINE displayed as 1 dot.
could you send me the file?
Pierre.
herb
Posts: 281
Joined: Sat Jul 18, 2009 3:19 pm

Re: Smaller problems with Edit Comment

Post by herb »

Hello Pierre,

First I want to wish you a Happy and Prosperous New Year 2020.
Then I have to say thanks for your great work on XnViewMP during 2019.
'Annotation' is best to use anywhere?
Exiftool calls this tag: -file:comment
So "Annotation" is also ok for me.
how do you reproduce?
I still try to find a golden rule how to reproduce.
could you send me the file?
Attached please find such a *.jpg-image as zip-file.

Best regards
herb
Attachments
test_comment_newline.zip
(76.09 KiB) Downloaded 132 times
herb
Posts: 281
Joined: Sat Jul 18, 2009 3:19 pm

Re: Smaller problems with Edit Comment

Post by herb »

Hello Pierre,

I tried to find a way to reproduce the problem with "unprintable characters.

I started in a directory with 2 jpg images:
- file1: name contains only ascii characters
- file2: name contains ascii and also unicode characters (in my case some chinese characters)

(1) I assigned a description (annotation) to file1 with only 1 line and only ascii characters.
File descript.ion is written properly.
(2) I assigned a description to file2 with also chinese characters.
File descript.ion is NOT written properly: chinese characters are stored as ? This is also discussed in another post.
(3) I edited file description with a text-editor, wrote proper chinese characters - in filename itself and also in annotation -
and I stored the file in UTF-8 with BOM:
XnViewMP read this file properly when I tried to edit description/annotation again.
(4) I edited description with chinese characters: In detail I added another line and some more text.
NEWLINE was stored as \n by XnViewMP. And at lineend I found these unprintable characters.
(5) I removed the unprintable characters with my text-editor.
Now XnViewMP read this file not properly: the \n did not become a NEWLINE in description-field; it is shown as \n in printable form.

Hoping this helps
Best regards
herb
User avatar
xnview
Author of XnView
Posts: 46235
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Smaller problems with Edit Comment

Post by xnview »

Ok, i can reproduce. Not really a bug. By default, descript.ion file created is ANSI (for compatibility). If you create an empty unicode descript.ion file, it will be used.
Pierre.
Post Reply