Bug 356197

Summary: Files with other encoding than utf-8 are not displayed correctly, also encoding-option is defect
Product: [Applications] kompare Reporter: H.H. <cyberbeat>
Component: generalAssignee: Kompare developers <kompare-devel>
Status: CONFIRMED ---    
Severity: normal CC: bjoernv, jpwhiting
Priority: NOR    
Version: 4.1.3   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description H.H. 2015-12-02 14:12:28 UTC
I try to compare two files with iso-8859-1 (german) encoding, all "umlauts"/.. are displayed as a black-diamond-question-mark-symbol.

kompare --help
lists an option:
  --e <encoding>  Use this to specify the encoding when calling it from the
                  command line. It will default to the local encoding if not
                  specified.
but this results in the error "Unknown option 'e'."

So I cannot compare other files than utf-8.

These are my locale settings:
locale
LANG=de_DE.UTF-8
LC_CTYPE="de_DE.UTF-8"
LC_NUMERIC="de_DE.UTF-8"
LC_TIME="de_DE.UTF-8"
LC_COLLATE="de_DE.UTF-8"
LC_MONETARY="de_DE.UTF-8"
LC_MESSAGES="de_DE.UTF-8"
LC_PAPER="de_DE.UTF-8"
LC_NAME="de_DE.UTF-8"
LC_ADDRESS="de_DE.UTF-8"
LC_TELEPHONE="de_DE.UTF-8"
LC_MEASUREMENT="de_DE.UTF-8"
LC_IDENTIFICATION="de_DE.UTF-8"
LC_ALL=

Reproducible: Always
Comment 1 bjoernv 2022-02-09 13:29:53 UTC
Bug still exists in kompare 21.12.2.

The option is not implemented as shown in source code:

        if (parser.isSet(QStringLiteral("e <encoding>")))
        {
            // Encoding given...
            // FIXME: Need to implement this...
        }

The work-around is to open kompare without arguments. The initial dialog lets you select the encoding.

Are there chances, that patches will be accepted?
Comment 2 Jeremy Whiting 2022-02-09 13:37:48 UTC
Of course. Patches are always welcome.