When I open an NFO file, it opens with Kate. That’s nice. However, with Kate 25.04.0-1 I cannot see any option to set NFO files to open with encoding CP437 (or IBM437) for correct text display on NFO files.
From a terminal, both of these lines work:
kate --encoding cp437 NFO.nfo
kate --encoding ibm437 NFO.nfo
Looking at Kate’s Settings, under the ‘Open/Save’ tab is another tab - Modes & Filetypes.
In there, we create a New filetype, but there appears to be no field to specify the encoding for this filetype… a field referenced in several searches.
I just had a go with creating a new file:
~/.local/share/org.kde.syntax-highlighting/syntax/nfo.xml
Summary
<?xml version="1.0" encoding="UTF-8"?>
<language name="NFO" version="1.0" kateversion="5.0" section="Other"
extensions="*.nfo" mimetype="text/x-nfo" priority="1">
<metadata>
<property name="encoding">CP437</property>
</metadata>
<highlighting>
<contexts>
<context name="Normal" attribute="Normal Text" lineEndContext="#stay"></context>
</contexts>
</highlighting>
</language>
It just seems a real mess. The Manjaro ‘extra’ has a basic GTK4 viewer which similarly fails, and has no settings for encoding.
I’m tired to keep looking at this - and if I open the file in Kate it’s also no simple task (i.e. you can’t just search and find, and can’t find it by clicking…).