[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: converting between charsets
From: |
Stefan Monnier |
Subject: |
Re: converting between charsets |
Date: |
Mon, 08 May 2006 10:30:48 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
> It fails. Its default value contains element
> ("^\\(fido7\\|relcom\\)\\.[^,]*\\(,[ \n]*\\(fido7\\|relcom\\)\\.[^,]*\\)*$"
> koi8-r
> (koi8-r))
> and my post to fido7 hierarchy go in utf-8 anyway.
[ I don't know if your settnig is correct and supposed to work,
but I'll assume it is. ]
Then please report this as a bug with M-x report-emacs-bug (or directly to
the Gnus guys, but be sure to include the kind of information included in
M-x report-emacs-bug).
> Let's first talk about encoding regions. Why does not it work with
> encode-coding-region?
It works. Any evidence that it doesn't?
> What about garbage, if encoding/decoiding works I can always decode
> into internal representation and encode into desired charset in
> send-hook.
Not always: decoding+encoding can't always be exact inverses of each other.
> I would be happy to get an answer on question: "How do I decode and
> encode in Emacs?"
It's not the right question. The question you seem to want to ask is "how
do I change the way Emacs's package FOO encodes/decodes my object BAR?"
SM> So one way to do it is to take care of the encoding yourself, which may
SM> amount to doing the whole "send" yourself (i.e. the NIH approach).
SM> Or the
> NIH?
Not Invented Here: the typical reaction of reinventing your own wheel rather
than try to adapt the ones you're already using (but which you haven't built
yourself).
SM> other way is to figure out how to tell the code that already does the
SM> encoding to use koi8 rather than utf-8.
> There is no such code right now, and, probably, I will write it.
You complain that it uses utf-8, so somewhere a piece of code encodes the
text into utf-8.
>>> 1. Paste into Emacs frame works strange:
SM> What text did you paste? Where does it come from?
> I type some Russian text in xterm and paste in into Emacs, have a look
> at the attached screenshot.
Oh, I see. I don't know enough of how this works to help you much further.
If you hit C-u C-x = on the various chars (especially on two similar chars
displayed with different fonts), you'll see that they come from different
charsets (one is probably something like iso-8859-5 and the other may be
unicode). Emacs-22 doesn't unify them by default. You can try to put
(unify-8859-on-decoding-mode 1) in your .emacs. And you can also try to
play with utf-fragment-on-decoding. And ask someone more knowledgeable
about such problems.
You could even M-x report-emacs-bug about it, since maybe the default config
in a cyrillic locale should already take care of it.
>>> Cyrillic nput in emacs -nw in xterm still does not work, if I just
>>> change X keyboard layout.
SM>
SM> That doesn't give us much to go on, does it? What does it do, other than
SM> "not work"?
> It beeps.
What does C-h l show after hitting a particular key?
Stefan
- converting between charsets, Alexander Kotelnikov, 2006/05/07
- Re: converting between charsets, Stefan Monnier, 2006/05/07
- Re: converting between charsets, Alexander Kotelnikov, 2006/05/07
- Re: converting between charsets, Stefan Monnier, 2006/05/07
- Re: converting between charsets, Alexander Kotelnikov, 2006/05/08
- Re: converting between charsets,
Stefan Monnier <=
- Re: converting between charsets, Alexander Kotelnikov, 2006/05/09
- Re: converting between charsets, Stefan Monnier, 2006/05/09
- Re: converting between charsets, Alexander Kotelnikov, 2006/05/13
- Re: converting between charsets, Stefan Monnier, 2006/05/13
- Re: converting between charsets, Alexander Kotelnikov, 2006/05/14
- Re: converting between charsets, Stefan Monnier, 2006/05/14
- Re: converting between charsets, Alexander Kotelnikov, 2006/05/15
- Re: converting between charsets, Alexander Kotelnikov, 2006/05/15
- Re: converting between charsets, Stefan Monnier, 2006/05/15
- Re: converting between charsets, Alexander Kotelnikov, 2006/05/15