descript.ion display unicode incorrectly

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

Moderator: Dreamer

waily
Posts: 10
Joined: Fri Feb 12, 2010 1:12 am

descript.ion display unicode incorrectly

Post by waily »

descript.ion content (encode in ANSI)
"XnViewMP" 中文字

Upper pic is correct when describe comment, but change to
other directory and back here, it display incorrectly.

Image
User avatar
xnview
Author of XnView
Posts: 34093
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: descript.ion display unicode incorrectly

Post by xnview »

but descript.ion is not encoded as unicode
Pierre.
waily
Posts: 10
Joined: Fri Feb 12, 2010 1:12 am

Re: descript.ion display unicode incorrectly

Post by waily »

xnview wrote:but descript.ion is not encoded as unicode
Yes, then either trans encoding descript.ion as unicode or make it ansi read and write.
For old descript.ion, keep it as ansi is much better.
User avatar
xnview
Author of XnView
Posts: 34093
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: descript.ion display unicode incorrectly

Post by xnview »

waily wrote:
xnview wrote:but descript.ion is not encoded as unicode
Yes, then either trans encoding descript.ion as unicode or make it ansi read and write.
For old descript.ion, keep it as ansi is much better.
the problem is for old descript.ion file
Pierre.
waily
Posts: 10
Joined: Fri Feb 12, 2010 1:12 am

Re: descript.ion display unicode incorrectly

Post by waily »

xnview wrote:
waily wrote:
xnview wrote:but descript.ion is not encoded as unicode
Yes, then either trans encoding descript.ion as unicode or make it ansi read and write.
For old descript.ion, keep it as ansi is much better.
the problem is for old descript.ion file
Is it possible to keep old descript.ion but internel use unicode for display and modify ?
Something like add a layer to transencoding ANSI to unicode in file io.
This way you can keep all internel XNViewMP deal with unicode and keep old descript.ion.
User avatar
xnview
Author of XnView
Posts: 34093
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: descript.ion display unicode incorrectly

Post by xnview »

waily wrote: Is it possible to keep old descript.ion but internel use unicode for display and modify ?
Something like add a layer to transencoding ANSI to unicode in file io.
This way you can keep all internel XNViewMP deal with unicode and keep old descript.ion.
i don't understand, i can't change the encoding for description without breaking compatibility.
Pierre.
herb
Posts: 174
Joined: Sat Jul 18, 2009 3:19 pm

Re: descript.ion display unicode incorrectly

Post by herb »

Hello,

I have seen the following with XnViewMP 0.75:
- in case of file descript.ion is edited manually as unicode-file all descriptions are displayed correctly after reading the file.
(also comments for filenames with unicode characters are displayd correctly):
- but after the file is written again by XnViewMP it is stored as ANSI (in my case with windows 1252 codepage)
So characters as e.g. German umlauts get lost.

Therefore I do not see a problem when XnViewMP will store the file with UTF8 encoding.
Old files descript.ion (that really contain only ASCII characters) will not be changed.
Now it will be possible to store comments with unicode characters also for files with unicode characters in filename.

In addition I have seen that XnViewMP 0.75 has problems with first entry in file descript.ion.
In my case it did not display that value.

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

Re: descript.ion display unicode incorrectly

Post by xnview »

herb wrote: In addition I have seen that XnViewMP 0.75 has problems with first entry in file descript.ion.
In my case it did not display that value.
Strange i have not this issue, the description file is in unicode?
Pierre.
herb
Posts: 174
Joined: Sat Jul 18, 2009 3:19 pm

Re: descript.ion display unicode incorrectly

Post by herb »

Hello Pierre,

thanks for your quick reply.
The problem with first line of file descript.ion is only in case of a BOM exists.
It doesn't matter whether the comment has unicode characters or not. It depends only on BOM.

Thanks also for your PM and the beta version of XnViewMP. But I regret, I still work on a 32-bit XP system.
But I will try to have access to a WIN7 system 64-bit on weekend.

Best regards
Herb
herb
Posts: 174
Joined: Sat Jul 18, 2009 3:19 pm

Re: descript.ion display unicode incorrectly

Post by herb »

Hello Pierre,

today I tested the beta version of XnViewMP, you sent via private mail, on a Win7 64-bit system.
I tested only the behaviour of writing file descript.ion.

I regret, but I have seen no changes writing this file. XnViewMP does not create an UTF8-file.

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

Re: descript.ion display unicode incorrectly

Post by xnview »

herb wrote: I regret, but I have seen no changes writing this file. XnViewMP does not create an UTF8-file.
no for creating, but read/modify
Pierre.
herb
Posts: 174
Joined: Sat Jul 18, 2009 3:19 pm

Re: descript.ion display unicode incorrectly

Post by herb »

Hello Pierre,

I prepared an unicode file descript.ion with my editor EditPad Lite.
- all filenames contained only ASCII characters
- comment contained also unicode characters (in my case 2 Chinese characters).

Reading testcase:
XnViewMP read and displayed all correctly (same as released XnViewMP 0.75).
In case of file contained BOM XnViewMP did not display comment of very first entry.

Modifying testcase:
I added German umlauts to existing comment and stored.
File was stored (in my case) as windows 1252 file.
German umlauts had been stored as 1 byte characters and Chinese characters were changed to question marks.

Best regards
Herb
herb
Posts: 174
Joined: Sat Jul 18, 2009 3:19 pm

Re: descript.ion display unicode incorrectly

Post by herb »

Hello Pierre,

in changelog of XnViewMP 0.76 is mentioned that the request for file descript.ion in UTF8 is solved.
I regret, but I have seen no changes to previous versions.

Please implement this important feature.

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

Re: descript.ion display unicode incorrectly

Post by xnview »

XnViewMP will use utf8 if description is utf8, else use locale codepage
Pierre.
herb
Posts: 174
Joined: Sat Jul 18, 2009 3:19 pm

Re: descript.ion display unicode incorrectly

Post by herb »

Hello Pierre,

On my windows XP system I started with a directory that contains
- files with only ascii characters in filename
- files with ascii and unicode characters in filename
- file descript.ion did not extist
The unicode characters (=chinese characters) did not belong to the German codepage on my system.

I opened dialog for a file with unicode characters in filename (and also ascii characters in filename) and
I entered a comment that contained both ascii and chinese characters and stored it.

Opening the file descript.ion with a text editor showed that all unicode characters that do not belong to system codepage are stored as question mark.

Sorry that I have no good news
Best regards
Herb
Post Reply