Charset plugin
Charset plugin lets you decode or encode data using charsets.
There is default charset for decode/encode, and specific charsets
for buffers (or group of buffers).
This plugin is optional, but recommended: if it's not loaded, WeeChat
can only read/write UTF-8 data.
Charset plugin should be autoloaded by WeeChat at startup.
To be sure plugin is loaded, try: /charset.
If command is not found, then load plugin with command:
/plugin load charset
If plugin is not found, then you should compile again WeeChat with
plugins and Charset support.
When Charset plugin starts, it displays terminal and internal charsets.
Terminal charset depends on your locale, and internal is UTF-8.
For example :
charset: terminal: ISO-8859-15, internal: UTF-8
Options (file charset.conf)
&charset_options.xml;
To set global decode and encode charsets, use command
/set.
For example:
/set charset.default.decode ISO-8859-15
/set charset.default.encode ISO-8859-15
If global decode charset is not set (for example during first
load of Charset plugin), it will be automatically set to terminal
charset (if it's different from UTF-8), or by default to
"ISO-8859-1".
Default encode value is empty, so it sends by default with
internal charset (UTF-8).
To set IRC server charset, use command /charset on
server buffer.
If you give only charset, then it will set "decode" and "encode"
values.
For example:
/charset ISO-8859-15
It's equivalent to:
/charset decode ISO-8859-15
/charset encode ISO-8859-15
To set IRC channel (or private) charset, use same commands as server,
but on channel (or private) buffer.
To set charset for all IRC channels (and privates) of an IRC server,
use following command:
/set charset.decode.irc.freenode ISO-8859-15
To see all charsets used, use following command:
/set charset.*
Commands
&charset_commands.xml;
FAQ
If you have problems with chars or accents using Charset plugin:
check that weechat-curses is linked to libncursesw (warning:
needed on most distributions but not all) :
ldd /path/to/weechat-curses
check charset line (on WeeChat buffer), you should see
ISO-XXXXXX or UTF-8 for terminal charset. If you see
ANSI_X3.4-1968 or other values, probably your locale is wrong.
setup global decode value, for example:
/set charset.default.decode ISO-8859-15