[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: changing encoding of buffer
From: |
Eli Zaretskii |
Subject: |
Re: changing encoding of buffer |
Date: |
Tue, 29 May 2007 22:52:11 +0300 |
> From: M G Berberich <berberic@forwiss.uni-passau.de>
> Date: Tue, 29 May 2007 14:39:20 +0200
>
> > Suppose those unnamed "MS-products" did announce they produce text
> > in windows-1252, how would that help you avoid the problem?
>
> Then my newsreader would convert the text from windows-1252 to UTF-8
> (which is my locale environment) before calling emacs and all would
> work fine.
And your newsreader cannot be told that, when the encoding is not
stated, to assume windows-1252, as your fix-ms-posting does?
(Btw, did you use that newsreader to post your article? If so, it
also lies about the encoding: it claimed the message was in Latin-9
(iso-8859-15), when in fact it was in UTF-8.)
> The problem is that the encoding is not declared, so the
> newsreader does not know that it is windows-1252 and not koi8-r or
> EBCDIC or latin-2 or …
In my experience, when the encoding is not stated, or stated as
Latin-1, it is windows-1252. I have yet to see a koi8-r encoded
message that doesn't say it, but I guess anything could happen.
> > I see no need to call `recode': Emacs can do that itself.
>
> Fine, how can this be done?
Use encode-coding-region to encode the region in windows-1252, then
use decode-coding-region to decode it back as UTF-8. That's it!