Bug 501263

Summary: Encoding shown in the status bar doesn't match the factual rendering of content
Product: [Applications] kate Reporter: Anton <antkaid+bugskde>
Component: encodingAssignee: KWrite Developers <kwrite-bugs-null>
Status: REPORTED ---    
Severity: normal    
Priority: NOR    
Version First Reported In: 24.12.1   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: File used to reproduce the bug

Description Anton 2025-03-09 15:02:14 UTC
SUMMARY
Sometimes the name of the encoding shown in the status bar does not match the factual rendering of file characters.

STEPS TO REPRODUCE
1. Open the attached file in Kate. The guessed encoding (ISO-8859-15) is not correct, but that's OK, because the file is a mixture of Latin & Cyrillic. At this point the file's second row renders as "Íÿ".
2. In the status bar, change ISO-8859-15 to Cyrillic > "cp 1251". The file's second row now renders as "Ня". At this point both encoding name in the status bar and the rendering are correct and matching each other.
3. Close the file in Kate.
4. Open file again, e.g. from Recent.

OBSERVED RESULT
Encoding name in the status bar shows "windows-1251", while the file is factually rendered in ISO-8859-15, showing the second row as "Íÿ". The status bar encoding info doesn't match the factual rendering.

EXPECTED RESULT
Encoding name in the status bar should always match the encoding used for content rendering. For example:
a) either Kate should truthfully state "ISO-8859-15" in the status bar;
b) or, if the status bar states "windows-1251", then render the content in "windows-1251".
Comment 1 Anton 2025-03-09 15:04:16 UTC
Created attachment 179246 [details]
File used to reproduce the bug