Charset module doesn't work with irc.juggler.jp #345

Closed
opened 2026-10-05 04:14:18 +02:00 by adam · 9 comments
Owner

This is followup of #308.

ZNC version 1.4.

First, the charset module still is configurable per user, not per network.

Second, it simply doesn't work. irc.juggler.jp uses ISO-2022-JP (this codepage is present in the output of iconv --list on server) as network encoding. So I've done as wiki suggests /znc loadmod charset UTF-8 ISO-2022-JP and trying to use client configured with UTF-8 charset. And I don't see an effect from charset module, all my messages are passed in UTF-8 to server and client receives messages in wrong codepage, like I'm connecting with UTF-8 client to this server directly.

The -force module option isn't suitable for me, as this is the single network (from 6) for my znc user, which requires charset different form UTF-8. So I haven't tested with this option.

This is followup of #308. ZNC version 1.4. First, the charset module still is configurable per user, not per network. Second, it simply doesn't work. irc.juggler.jp uses ISO-2022-JP (this codepage is present in the output of `iconv --list` on server) as network encoding. So I've done as [wiki](http://wiki.znc.in/Charset) suggests `/znc loadmod charset UTF-8 ISO-2022-JP` and trying to use client configured with UTF-8 charset. And I don't see an effect from charset module, all my messages are passed in UTF-8 to server and client receives messages in wrong codepage, like I'm connecting with UTF-8 client to this server directly. The `-force` module option isn't suitable for me, as this is the single network (from 6) for my znc user, which requires charset different form UTF-8. So I haven't tested with this option. <!-- github-sync-id:35915571 -->
adam closed this issue 2026-10-05 04:14:18 +02:00
Author
Owner

Can you try git/nightly version? It does encodings differently now, and per-network.

Can you try git/nightly version? It does encodings differently now, and per-network. <!-- github-comment-id:46365695 -->
Author
Owner

The change didn't come into 1.4 which was mostly crashfix release.

The change didn't come into 1.4 which was mostly crashfix release. <!-- github-comment-id:46365820 -->
Author
Owner

Yep, will do later this week.

Yep, will do later this week. <!-- github-comment-id:46365871 -->
Author
Owner

I've built current master. As I see from git commits charset was integrated into core. I've made sure that charset was enabled during configure (requires libicu). Though it's completely missing from list of modules for user and for network, /znc loadmod charset UTF-8 ISO-2022-JP claims Unable to find modinfo [charset]. I guess it can be configured through znc.conf, but I don't know how exactly.

PS Seems that this module/option lacks support from WebUI.

I've built current master. As I see from git commits charset was integrated into core. I've made sure that charset was enabled during configure (requires libicu). Though it's completely missing from list of modules for user and for network, `/znc loadmod charset UTF-8 ISO-2022-JP` claims `Unable to find modinfo [charset]`. I guess it can be configured through `znc.conf`, but I don't know how exactly. PS Seems that this module/option lacks support from WebUI. <!-- github-comment-id:46424544 -->
Author
Owner

I've checked sources again and added ClientEncoding = UTF-8 under <User> section and Encoding = ISO-2022-JP under relevant <Network> section. But it still doesn't work as expected, and the resulting codepage on client is kinda different from ISO-2022-JP, but it differs from situation UTF-8 client → ISO-2022-JP server.

I've checked sources again and added `ClientEncoding = UTF-8` under `<User>` section and `Encoding = ISO-2022-JP` under relevant `<Network>` section. But it still doesn't work as expected, and the resulting codepage on client is kinda different from ISO-2022-JP, but it differs from situation UTF-8 client → ISO-2022-JP server. <!-- github-comment-id:46426522 -->
Author
Owner

OK, I managed to set things up properly using *controlpanel. These options should really be documented and available via WebUI.

But the new issue arose. ZNC recodes control chars, completely breaking them. Here is sample I receive:

[20:30:14] <Lavos^> !e oeuvre
[20:30:14] <%jBot> Searched for [ "oeuvre" ]  Found 3 entries.  (Report bugs to japanese-irc@shaw.ca)
[20:30:15] <%jBot> [ オードブル (P)� ] - (n) hors d'oeuvre� �
[20:30:16] <%jBot>  口取り� [ くちとり� ] - (n) leading a horse, cow, etc.� - groom, horse boy� - hors d'oeuvre, appetizer, side dish� �
[20:30:16] <%jBot>  突き出し (P)� / つき出し� [ つきだし (P)� ] - (n) protrusion� - (Japanese) hors d'oeuvre, snacks� - (sumo winning technique of) pushing out of the ring� �

Every '�' represents a control char here.

Should I open new issues for the pointed problems?

OK, I managed to set things up properly using `*controlpanel`. These options should really be documented and available via WebUI. But the new issue arose. ZNC recodes control chars, completely breaking them. Here is sample I receive: ``` [20:30:14] <Lavos^> !e oeuvre [20:30:14] <%jBot> Searched for [ "oeuvre" ] Found 3 entries. (Report bugs to japanese-irc@shaw.ca) [20:30:15] <%jBot> [ オードブル (P)� ] - (n) hors d'oeuvre� � [20:30:16] <%jBot> 口取り� [ くちとり� ] - (n) leading a horse, cow, etc.� - groom, horse boy� - hors d'oeuvre, appetizer, side dish� � [20:30:16] <%jBot> 突き出し (P)� / つき出し� [ つきだし (P)� ] - (n) protrusion� - (Japanese) hors d'oeuvre, snacks� - (sumo winning technique of) pushing out of the ring� � ``` Every '�' represents a control char here. Should I open new issues for the pointed problems? <!-- github-comment-id:46468607 -->
Author
Owner

Hm, I remember adding that setting to webadmin, but now I can't find it there :(

Hm, I remember adding that setting to webadmin, but now I can't find it there :( <!-- github-comment-id:46494102 -->
Author
Owner

#778 adds this setting to webadmin.
@z0rc Where I can see this bot in action to debug the issue with control chars?

#778 adds this setting to webadmin. @z0rc Where I can see this bot in action to debug the issue with control chars? <!-- github-comment-id:67580023 -->
Author
Owner

irc.juggler.jp:6667
#japanese

irc.juggler.jp:6667 #japanese <!-- github-comment-id:67605660 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/znc#345