To create new wiki account, please join us on #znc at Libera.Chat and ask admins to create a wiki account for you. You can say thanks to spambots for this inconvenience.

Charset/old

From ZNC
Revision as of 11:00, 17 December 2011 by DarthGandalf (talk | contribs) (Created page with "{{Extra Module | version = 0.090}} Normalizes (i.e. converts) character encodings. == Usage == === Arguments === [-force] <client_charset1[,client_charset2[,...]]> <server...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Template:Extra Module

Normalizes (i.e. converts) character encodings.

Usage

Arguments

[-force] <client_charset1[,client_charset2[,...]]>  <server_charset1[,server_charset2[,...]]>

-force makes the module convert ALL messages instead of probing whether they are already encoded using the target charset. This is useful for encodings with byte data that is also valid in the target charset.

Supported charsets

All charsets supported by iconv are also supported by the module. At least in theory. Use iconv --list on your shell to get a list.

Examples

If your client understands and/or receives UTF-8 only, but some weird server you are on wants ISO-8859-1 exclusively:

/znc loadmod charset UTF-8 ISO-8859-1

If people on that server confuse basic charsets:

/znc loadmod charset UTF-8 ISO-8859-1,ISO-8859-15,WINDOWS-1252

This will make ZNC send ISO-8859-1 to the server, but convert ISO-8859-1, ISO-8859-15 and WINDOWS-1252 to UTF-8 in the other direction.

If your client sends ISO-8859-1 but you want UTF-8 to be sent to your channels:

/znc loadmod charset ISO-8859-1 UTF-8

You should also use this one if your clients sends ISO-8859-1 and you heavily use webadmin. Webadmin only displays UTF-8 (weird characters appear for other encodings).

If your client only speaks UTF-8, but the server wants CP1251 exclusively:

/znc loadmod charset -force UTF-8 CP1251

Warning

If you connect multiple clients, and send a message from client A, client B will receive the converted version of the message. This is just how ZNC works and cannot be changed by a module.