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: Wed, 30 May 2007 09:35:09 +0200
User-agent: slrn/0.9.8.1pl1 (Debian)

On Wed, 30 May 2007 06:22:29 +0300, Eli Zaretskii <address@hidden> wrote:
>> From: M G Berberich <address@hidden>
>> Date: Tue, 29 May 2007 23:06:48 +0200
>> 
>> > 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.
>
> That's strange: the function you showed that used recode did it the
> other way around, no?

No. It works this way.

  Given: text in windows-1252-encoding in a utf-8-buffer
  Result: same text in UTF-8-encoding in a utf-8-buffer

Don't ask me why.

MfG
bmg

-- 
Artikel 3 und 12a des Grundgesetzes  kurz  | M G Berberich
zusammengefaßt: Männer  und  Frauen  sind  | address@hidden
gleichberechtigt, ausgenommen Männer, die  |
müssen zur Bundeswehr.                     | http://www.uni-passau.de/~berberic


reply via email to

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