erc-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Erc-discuss] Re: encodings for buffers with private messages


From: It's me FKtPp \;\)
Subject: [Erc-discuss] Re: encodings for buffers with private messages
Date: Wed, 14 Mar 2007 11:14:07 +0800
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.95 (gnu/linux)

"Alex Ott" <address@hidden> writes:

> Hello all
>
> I try to setup erc to work in multilingual environment. I select koi8
> for some channels and all works fine. But when i want to exchange
> private messages with peoples, who are using koi8, i can't see their
> messages in proper encoding.

uh... Seems maybe I can give some adv. 

For this problem a temporary work around is:

    set your default encoding/decoding system (variable:
    erc-server-coding-system) to koi8, which will be used when erc
    can't correct detected the coding system to use, this should be
    okay for other ascii only channel because almost all traditional
    coding/decoding method is compatible with ASCII.

    But it will cause problems when you always chat in two
    incompatible coding system, etc. koi8/utf8, gb2312/utf8, forgive
    me, my patch only implement the channel specific decoding
    things...

Let's see, first of all, AFAIK the IRC RFC's didn't define anything
about string encoding/decoding, it's all about ASCII... So things we
can do is *presume* what people will do when they chat in multilingual
environment, and implement a as handy/flexible as possible way to
handle the encoding/decoding things.

The current encoding/decoding implementation is ... 

    1) We receive a IRC message, we assume it is encoded in the
    default coding system.

    2) Extract the 'channel' part from the message, and decode it
    using the default coding system.

    3) Check the channel<->coding list to see if there's a matching
    coding system to use for the extracted 'channel' string.
           3.1) Got one? Use it
           3.2) Otherwise. use the default coding system

    4) Re-decode the message using the coding system we just got.

Now we can see, according RFC the 'private message' from person to
person didn't contain any *channel* information, so it's always be
decoded using the default coding system (variable:
erc-server-coding-system).... :'(...

> 
> Is it possible to define list of nicks for which will applied other
> encoding, than encoding of server. Or may be it possible to switch
> encoding on the fly?


And now, the change coding system on-the-fly feature. It's possible,
but non-user-friendly and limited: change 'erc-server-coding-system'
or 'erc-encoding-coding-alist', and it will take effect.
    





reply via email to

[Prev in Thread] Current Thread [Next in Thread]