Text outside Latin-1 in aux items, messages and status is handled three ways #333

Closed
opened 2026-10-24 22:21:29 +00:00 by littlefox · 2 comments
Owner

Interop audit, 2026-10-24.

Characters outside Latin-1 are handled three different ways.

  • Aux items (fast replies, cross-reference descriptions, image file names): compose::aux_data writes UTF-8 when the text doesn't fit Latin-1. The Emacs client decodes aux data as lyskom-server-coding-system (Latin-1; lyskom-aux-item-decode-data, aux-items.el), so its users see mojibake. httpkom/jskom try UTF-8 first, then Latin-1 (komserialization.py), so jskom is fine.
  • Chat messages: refused outside Latin-1 (Kom::send_message).
  • "Vad gör du?": such characters become ? (Kom::set_doing).
  • Names: refused outside Latin-1.
  • Text bodies are fine everywhere: UTF-8 with charset=utf-8, which Emacs honours (komtypes.el) and httpkom too.

Reactions already store Latin-1 emoticons for this reason (#101).

Options, strict to permissive:

  1. Latin-1 everywhere outside bodies: refuse, or say what will change before sending. Consistent and safe for Emacs.
  2. As now, made deliberate: UTF-8 where only Emacs suffers (aux items), refused where it reaches other users' screens directly (messages, names).
  3. UTF-8 everywhere it's possible: modern, but Emacs users see mojibake.
Interop audit, 2026-10-24. **Characters outside Latin-1 are handled three different ways.** - **Aux items** (fast replies, cross-reference descriptions, image file names): `compose::aux_data` writes UTF-8 when the text doesn't fit Latin-1. The Emacs client decodes aux data as `lyskom-server-coding-system` (Latin-1; `lyskom-aux-item-decode-data`, `aux-items.el`), so its users see mojibake. httpkom/jskom try UTF-8 first, then Latin-1 (`komserialization.py`), so jskom is fine. - **Chat messages:** refused outside Latin-1 (`Kom::send_message`). - **"Vad gör du?":** such characters become `?` (`Kom::set_doing`). - **Names:** refused outside Latin-1. - **Text bodies** are fine everywhere: UTF-8 with `charset=utf-8`, which Emacs honours (`komtypes.el`) and httpkom too. Reactions already store Latin-1 emoticons for this reason (#101). Options, strict to permissive: 1. **Latin-1 everywhere outside bodies:** refuse, or say what will change before sending. Consistent and safe for Emacs. 2. **As now, made deliberate:** UTF-8 where only Emacs suffers (aux items), refused where it reaches other users' screens directly (messages, names). 3. **UTF-8 everywhere it's possible:** modern, but Emacs users see mojibake.
Author
Owner

We will go with option 2. It is a feature that is not used often, and we have a strong case that the emacs client is the one not interpreting text correctly since it remains to be the odd one out.

We will go with option 2. It is a feature that is not used often, and we have a strong case that the emacs client is the one not interpreting text correctly since it remains to be the odd one out.
Author
Owner

Merged in #384; main run #725 green. Option 2: "Vad gör du?" now refuses characters outside Latin-1, with a message and a disabled button (it used to send '?'). Names and chat messages were already refused; aux data stays UTF-8 when needed. The policy is in DESIGN §3. presence.spec checks it on all profiles.

Merged in #384; main run #725 green. Option 2: "Vad gör du?" now refuses characters outside Latin-1, with a message and a disabled button (it used to send '?'). Names and chat messages were already refused; aux data stays UTF-8 when needed. The policy is in DESIGN §3. presence.spec checks it on all profiles.
littlefox referenced this issue from a commit 2026-10-28 15:15:37 +00:00
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
littlefox/neokom#333
No description provided.