Hehe, my "plain #X11 with #xcb" journey is really starting at square 1.

TIL, "legacy" (ICCCM) X11 window properties use a type STRING which only allows #latin1 encoding. There's a weird thing called COMPOUND_TEXT to work around that which probably isn't worth implementing today. 🤯

Fixed my code to
- Make sure we use a UTF-8 locale
- Convert the window title to Latin1 for setting WM_NAME
- Additionally set the original UTF-8 title in _NET_WM_NAME (of type UTF8_STRING).

Wow, baby steps 😂

https://github.com/Zirias/xmoji/commit/3701d56cc76e1cd5688e20aed3539562faf90950

X11Adapter: Conversion to latin1 (for STRING) · Zirias/xmoji@3701d56

Handle encoding for X11 STRING properties, init locale and try to make sure we're using UTF-8, set window title in both legacy WM_NAME and UTF-8 _NET_WM_NAME.

GitHub
Sonderzeichen sind Glückssache.
#utf8 #latin1
J'ai enfin trouvé un moment pour me pencher sur un problème d'encodage foireux suite aux mises à jour cumulatives d'un #spip datant de Mathusalem (septembre 2003) chez #OVH : du contenu #utf8 dans une #bdd en #latin1...
J'ai suivi ça (http://zzz.rezo.net/Reparer-le-charset-d-une-base-SPIP.html) en bossant avec un dump sur une VM #debian disposant d'un accès root sur un serveur #mariadb. Ben cette merdouille qui traînait depuis des années est enfin résolue ! 😃
Réparer le charset d'une base SPIP - ZZZ

Quand on part d'une vieille installation de SPIP il arrive qu'on enregistre les données en utf-8 dans des tables déclarées en latin1. Ca ne gêne pas (...)