Bug 289028 - Default encoding preference for Kompare
Summary: Default encoding preference for Kompare
Status: REPORTED
Alias: None
Product: kompare
Classification: Applications
Component: viewpart (show other bugs)
Version: unspecified
Platform: Chakra Linux
: NOR wishlist
Target Milestone: ---
Assignee: Kompare developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-15 09:07 UTC by Adrián Chaves (Gallaecio)
Modified: 2011-12-16 14:11 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Graphical explanation for the issue. (39.88 KB, image/png)
2011-12-15 09:27 UTC, Adrián Chaves (Gallaecio)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Adrián Chaves (Gallaecio) 2011-12-15 09:07:04 UTC
Version:           unspecified (using Devel) 
OS:                Linux

When opening differences between files with CP1252 encoding, Kompare fails to render non-ASCII characters as expected.

Reproducible: Always

Steps to Reproduce:
This is what I do:
1. Open with KDE SVN an SVN repository with Windows files (DOS/Windows end of line, and CP1252 encoding).
2. With Kate, which detects the encoding of the file fine, I add an special character to a random line of the file: ’.
3. I select this file, and choose to open differences between local changes and server revision in Kompare.

Actual Results:  
When rendering the difference, Kompare shows the character as an unknown character (interrogation symbol over a black background).

Expected Results:  
It should render the character as it is: ’.

Kompare 4.0.1
KDE SC 4.7.4
Comment 1 Adrián Chaves (Gallaecio) 2011-12-15 09:27:06 UTC
Created attachment 66770 [details]
Graphical explanation for the issue.
Comment 2 Kevin Kofler 2011-12-15 12:49:27 UTC
You have to specify the encoding in the preferences, the default is your system locale's encoding, which is usually UTF-8.
Comment 3 Adrián Chaves (Gallaecio) 2011-12-16 09:03:37 UTC
When calling Kompare from KDESVN, this command is used: kompare -on -

In the resulting Kompare window, encoding options is not available in the settings dialog.

I tried using -e parameter in the call, but neither “-e "cp1252"” nor “-e "cp 1252"” seems to work.

So, what is the procedure in this case to get the right encoding?
Comment 4 Kevin Kofler 2011-12-16 14:11:12 UTC
Hmmm, there's an encoding setting under Compare files…, but that requires you to give the files to compare again, so that's not helpful.

I think we need a preference for the default encoding to use.