Bug 327005 - saving the destination file unexpectedly converts it to the locale encoding
Summary: saving the destination file unexpectedly converts it to the locale encoding
Status: RESOLVED WORKSFORME
Alias: None
Product: kompare
Classification: Applications
Component: general (show other bugs)
Version: 4.1.2
Platform: FreeBSD Ports FreeBSD
: NOR normal
Target Milestone: ---
Assignee: Kompare developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-01 18:38 UTC by MikMak
Modified: 2018-11-12 03:16 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description MikMak 2013-11-01 18:38:31 UTC
I have two files in utf-8 to compare.

In startup dialog of Kompare I select UTF-8, but characters in destination view are printed with an latin-1 encoding and false diff are indicated.

When i save my file it is saved in iso-8859-15. 

Reproducible: Always

Steps to Reproduce:
1.Create two files in utf-8 with latin characters (éééààààôôô)
2.compare this
3.save
4.open the destination file in kwrite. It is in iso8859-15
5. recompare the two files they are different because in two different charset.
Comment 1 Kevin Kofler 2013-11-10 18:21:38 UTC
I cannot reproduce this here (Fedora 18, Kompare 4.1.2 from kdesdk 4.10.5). Both files are displayed as UTF-8 for me and the saved file is also in UTF-8.
Comment 2 MikMak 2013-11-10 23:40:11 UTC
thanks for your reply.
Surely because my locale on my BSD is ISO_8859... but this choice should not have any effect in Kompare. I tried kdiff3 and it works fine with utf-8 even if my locale is not utf-8.
Comment 3 Kevin Kofler 2013-11-11 14:22:10 UTC
An ISO-8859 locale? Wow, such a thing still exists? ;-)

So I tried running Kompare with the legacy locale (LANG=de_AT rather than the normal de_AT.UTF-8). I still cannot reproduce the "characters in destination view are printed with an latin-1 encoding and false diff are indicated" part, but I can confirm that saving the file writes it in the locale encoding.
Comment 4 MikMak 2013-11-11 17:25:30 UTC
Yes, this is the problem. If you re-open the both same files there are 
some differences cause the two files are not in the same encoding. The 
normal behavior should be to save the file in the same encoding it was 
opened. It is not crazy...

For my locale I must change that, it is the default locale in BSD. (and 
a bad idea that I can't explain)
Comment 5 Andrew Crouthamel 2018-11-10 03:21:30 UTC
Dear Bug Submitter,

This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond.

Thank you for helping us make KDE software even better for everyone!
Comment 6 MikMak 2018-11-11 08:24:34 UTC
Hello,

I have forgotten this report. 

I don't use kompare anymore. So I cannot try. I change my locale to UTF-8 now.

So I think you could close this report, indeed.

thanks
Comment 7 Andrew Crouthamel 2018-11-12 03:16:05 UTC
Thanks for the update!