Bug 356197 - Files with other encoding than utf-8 are not displayed correctly, also encoding-option is defect
Summary: Files with other encoding than utf-8 are not displayed correctly, also encodi...
Status: CONFIRMED
Alias: None
Product: kompare
Classification: Applications
Component: general (show other bugs)
Version: 4.1.3
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Kompare developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-02 14:12 UTC by H.H.
Modified: 2022-02-09 13:37 UTC (History)
2 users (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 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.