• UTF vs specific

    From Karel Kral@2:423/39 to All on Sunday, September 13, 2026 08:58:59
    Hello All!

    Let's say I have compiled a new version of GoldED. Currently I have two groups (Group A and Group B).

    My setup is:

    OS uses UTF-8

    GoldED is started through luit using, for example, a standard ISO charset

    Groups A and B use XLATCHARSET for conversion between the OS charset and a non-standard charset

    As I understand it, luit should no longer be necessary.How should I configure the new GoldED while remaining fully compatible with my existing setup?Ideally, I would like to:

    Use iconv-based charset conversion for most groups.

    Keep some groups using the existing OS non-standard charset conversion (including kludge lines).

    I have checked the available documentation (for example, the documentation bundled with the GoldED binaries), but I still see references to the old approach involving luit and related settings.

    Could someone explain the recommended way to configure this in current GoldED versions?

    Karel

    --- GoldED+/LNX 1.1.5-b20240209
    * Origin: Plast DATA (2:423/39)
  • From Eugene Subbotin@2:5075/35 to Karel Kral on Sunday, September 13, 2026 13:32:58
    Hello Karel!

    Sunday September 13 2026 08:58, you wrote to All:

    Let's say I have compiled a new version of GoldED. Currently I have
    two groups (Group A and Group B).

    My setup is:

    OS uses UTF-8

    GoldED is started through luit using, for example, a standard ISO
    charset

    Groups A and B use XLATCHARSET for conversion between the OS charset
    and a non-standard charset

    As I understand it, luit should no longer be necessary.How should I configure the new GoldED while remaining fully compatible with my
    existing setup?Ideally, I would like to:

    Use iconv-based charset conversion for most groups.

    Keep some groups using the existing OS non-standard charset
    conversion (including kludge lines).

    I have checked the available documentation (for example, the
    documentation bundled with the GoldED binaries), but I still see references to the old approach involving luit and related settings.

    Could someone explain the recommended way to configure this in current GoldED versions?

    Just comment the all XlatCharSet settings.

    // In the first line of config set the config chatset, e.g:
    XlatConfigSet LATIN-2

    // Set the defaults:

    // Chatset of your OS:
    XlatLocalSet UTF-8

    // Set the default import and export charsets:
    XlatImport LATIN-2
    XlatExport LATIN-2

    // For groups the same:
    GROUP UTF-8:
    MEMBER UTF-8, UTF8.FTN.MESSAGING
    XLATIMPORT UTF-8
    XLATEXPORT UTF-8
    ENDGROUP

    No luit is needed, just run the golded binary

    Eugene

    ... It's full of stars!
    --- GoldED+/BSD 2.0.0-b20260912 (NetBSD 11.0 Intel Core Haswell)
    * Origin: FireFox Station (2:5075/35)
  • From Karel Kral@2:423/39 to Eugene Subbotin on Tuesday, September 15, 2026 11:48:35
    Hello Eugene!

    13 Sep 26 13:32, you wrote to me:

    // In the first line of config set the config chatset, e.g:
    XlatConfigSet LATIN-2

    // Set the defaults:

    // Chatset of your OS:
    XlatLocalSet UTF-8

    // Set the default import and export charsets:
    XlatImport LATIN-2
    XlatExport LATIN-2

    OK, started step by step. OS is UTF-8.

    GROUP C
    XLATPATH /home/fido/golded/xlat
    XLATCHARSET CP895 LATIN-2 kam_il2.chs
    XLATCHARSET LATIN-2 CP895 il2_kam.chs
    XLATIMPORT CP895
    XLATEXPORT CP895
    XLATLOCALSET UTF-8
    XlatConfigSet LATIN-2
    ENDGROUP

    In that group "CP895" is compulsory. Does not work. Kludge is OK, what I see is rubish.

    (even if I try LANG=cs_CZ.ISO8859-2 - or even if I put original command - luit -encoding 'ISO-8859-2' ./golded -f I had before).

    Karel

    --- GoldED+/LNX 1.1.5-b20240209
    * Origin: Plast DATA (2:423/39)
  • From Eugene Subbotin@2:5075/35 to Karel Kral on Tuesday, September 15, 2026 14:06:18
    Hello Karel!

    Tuesday September 15 2026 11:48, you wrote to me:

    OK, started step by step. OS is UTF-8.

    GROUP C
    XLATPATH /home/fido/golded/xlat
    XLATCHARSET CP895 LATIN-2 kam_il2.chs
    XLATCHARSET LATIN-2 CP895 il2_kam.chs
    XLATIMPORT CP895
    XLATEXPORT CP895
    XLATLOCALSET UTF-8
    XlatConfigSet LATIN-2
    ENDGROUP

    In that group "CP895" is compulsory. Does not work. Kludge is OK, what
    I see is rubish.

    (even if I try LANG=cs_CZ.ISO8859-2 - or even if I put original
    command - luit -encoding 'ISO-8859-2' ./golded -f I had before).

    The config cannot work as written, and the reason is simple. GoldED+ 2.0.0 asks iconv first for every conversion.
    A *.CHS table is used only when iconv has no converter for the pair, and it looks for an XLATCHARSET line naming exactly the pair it needs. In a UTF-8 session the pair for reading is CP895 -> UTF-8. Your tables are CP895 <-> LATIN-2, so nothing ever uses them: the log says "No recoder from CP895 to UTF-8; falling back to charset tables", finds none, and shows the text unconverted. That is the rubbish.

    A few more things in what you posted. XLATCHARSET, XLATPATH, XLATLOCALSET and XLATCONFIGSET are global keywords.
    Inside a GROUP they are read as global settings at that point of the file, and XLATLOCALSET/XLATCONFIGSET must be the first lines of golded.cfg, before anything non-ASCII, or everything above them is read in another charset.
    Only XLATIMPORT and XLATEXPORT belong in a GROUP. XLATCONFIGSET LATIN-2 says golded.cfg itself is LATIN-2 - if the file is UTF-8, say UTF-8.
    And luit or LANG=cs_CZ.ISO8859-2 translate the terminal while XLATLOCALSET UTF-8 tells GoldED+ the terminal is UTF-8. The two undo each other, use one or the other.

    There are five tables in GoldED+'s CHS: kam_u8.chs (CP895 -> UTF-8), kam_852.chs and 852_kam.chs (CP895 <-> CP852), kam_il2.chs and il2_kam.chs (CP895 <-> LATIN-2). Letters follow the Kamenický layout, 0xB0-0xFF are the CP437 box characters as in CP895:

    https://drive.google.com/file/d/1WrQYRsw7p4q5yfceqgISClMHl_RLHuEJ/view?usp=sharing

    For your UTF-8 session put at the top of golded.cfg

    XLATLOCALSET UTF-8
    XLATCONFIGSET UTF-8
    XLATPATH /home/fido/golded/xlat
    XLATCHARSET CP895 UTF-8 kam_u8.chs
    XLATCHARSET CP895 LATIN-2 kam_il2.chs
    XLATCHARSET LATIN-2 CP895 il2_kam.chs
    XLATCHARSET CP852 CP895 852_kam.chs
    XLATCHARSET CP895 CP852 kam_852.chs
    XLATCHARSETALIAS CP895 KAMENICKY KEYBCS2 NEC-867 DOS-895

    And in the group:

    GROUP C
    XLATIMPORT CP895
    XLATEXPORT CP852
    ENDGROUP

    CP895 messages then read correctly and what you write goes out as CP852 with a proper CHRS kludge. Writing CP895 from a UTF-8 session is not possible with a table now (I'll add reverse-encoding later): a CHS table maps one byte to up to three, so it can turn a CP895 byte into a UTF-8 character but cannot read a UTF-8 character, which is several bytes. With XLATEXPORT CP895 in a UTF-8 session GoldED+ finds no converter and writes UTF-8 with "CHRS: UTF-8 4".

    If an area REALLY has to stay CP895, run an 8-bit session instead:

    XLATLOCALSET LATIN-2
    XLATCONFIGSET LATIN-2
    XLATPATH /home/fido/golded/xlat
    XLATCHARSET CP895 UTF-8 kam_u8.chs
    XLATCHARSET CP895 LATIN-2 kam_il2.chs
    XLATCHARSET LATIN-2 CP895 il2_kam.chs
    XLATCHARSET CP852 CP895 852_kam.chs
    XLATCHARSET CP895 CP852 kam_852.chs
    XLATCHARSETALIAS CP895 KAMENICKY KEYBCS2 NEC-867 DOS-895

    Then XLATIMPORT and XLATEXPORT CP895 in the group:

    GROUP C
    XLATIMPORT CP895
    XLATEXPORT CP895

    And a any terminal showing ISO-8859-2 (or luit). Then both directions go through the tables and a written message carries "CHRS: CP895 2". CP852 works the same way with the 852 tables.

    But PLEASE do not post CP895 messages to Fidonet!
    Neither the Fidonet standard FTS-5003 nor IANA recognizes this encoding.
    Nobody else has a table for it - iconv, Windows and OS/2 do not know the charset - so every other reader, GoldED+ without tables included, shows a CP895 message as rubbish, exactly what you saw.

    Czech and Slovak messages in Fidonet are CP852 written on the DOS systems ("CHRS: CP852 2") or LATIN-2 (AKA ISO 8859-2) written on any other OS ("CHRS: LATIN-2 2"), and GoldED+ 2.0.0 reads and writes both without any tables:

    GROUP C
    XLATIMPORT LATIN-2
    XLATEXPORT LATIN-2

    The tables are for reading old CP895 mail. So, please write only in CP852, LATIN-2 or UTF-8.

    Eugene

    ... It's full of stars!
    --- GoldED+/BSD 2.0.0-b20260912 (NetBSD 11.0 Intel Xeon Icelake)
    * Origin: FireFox Station (2:5075/35)