help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: changing encoding of buffer


From: M G Berberich
Subject: Re: changing encoding of buffer
Date: Tue, 29 May 2007 23:06:48 +0200
User-agent: slrn/0.9.8.1pl2 (Debian)

Am Tue, 29 May 2007 22:52:11 +0300 schrieb Eli Zaretskii:
>> From: M G Berberich <address@hidden>
>> 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?

Unfortunately not, it sticks to the standard and that says: No
declaration => ansi.

> (Btw, did you use that newsreader to post your article?  

No. This was the newsreader at work. 

> 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.)

You are right. It was definitely misconfigured. And yes, it's my
fault :(

>> > 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!

Thanks. It has to be:

    (encode-coding-region (point-min) end 'utf-8)
    (decode-coding-region (point-min) end 'windows-1252)

to work for me.

   MfG
   bmg
-- 
„Des is völlig wurscht, was heut beschlos- | M G Berberich
 sen wird: I bin sowieso dagegn!“          | address@hidden
(SPD-Stadtrat Kurt Schindler; Regensburg)  | www.fmi.uni-passau.de/~berberic


reply via email to

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