• Re: Understanding ASCII encoding across =?UTF-8?B?cGxhdGZvcm1zPw==?=

    From mmphosis@21:1/5 to All on Fri Dec 8 00:32:02 2023
    That iconv command is super helpful. Thank you!


    My serial card is currently in slot 3 on the Apple II:

    ]IN#3
    ]0 get a$ : ? a$; : if a$ <> chr$(4) goto
    ]RUN


    In the Terminal, on the Linux platform:

    ./mistral-7b-instruct-v0.1-Q4_K_M-main.llamafile --temp 0.7 -r '\n' -p
    'Display the euro symbol.' | tee /dev/tty | iconv -f UTF-8 -t
    ASCII//TRANSLIT | tr [:lower:] [:upper:] | tr '\n' '\r' > /dev/ttyUSB0

    Display the euro symbol.
    Answer: €


    On the Apple II:

    DISPLAY THE EURO SYMBOL.
    ANSWER: EUR

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Colin Leroy-Mira@21:1/5 to All on Thu Feb 1 22:35:50 2024
    Hi,

    ./mistral-7b-instruct-v0.1-Q4_K_M-main.llamafile --temp 0.7 -r '\n' -p >'Display the euro symbol.' | tee /dev/tty | iconv -f UTF-8 -t
    ASCII//TRANSLIT | tr [:lower:] [:upper:] | tr '\n' '\r' > /dev/ttyUSB0

    Display the euro symbol.
    Answer: €


    On the Apple II:

    DISPLAY THE EURO SYMBOL.
    ANSWER: EUR

    On a related note about iconv and Apple II,

    1) For international Apple IIs, the charset are:
    French: ISO646-FR1
    Spanish: ISO646-ES
    Italian: ISO646-IT
    German: ISO646-DE

    You can use iconv -f UTF-8 -t ISO646-FR1//TRANSLIT in the same manner.

    2) By the way, glibc 2.39, released yesterday, contains a little patch
    of mine that translits (some) emojis to ASCII:

    root@a2proxy:~# echo "😉" | iconv -f UTF-8 -t ASCII//TRANSLIT
    ;-)

    I wrote it so that my Mastodon client, which relies on a proxy for
    network access, json parsing and charset change, could display common
    emojis!
    --
    Colin
    https://www.colino.net/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)