From: M G Berberich <berberic@forwiss.uni-passau.de>
To: help-gnu-emacs@gnu.org
Subject: Re: changing encoding of buffer
Date: Tue, 29 May 2007 23:06:48 +0200 [thread overview]
Message-ID: <88hui4-np6.ln1@ID-306968.user.individual.net> (raw)
In-Reply-To: mailman.1402.1180468336.32220.help-gnu-emacs@gnu.org
Am Tue, 29 May 2007 22:52:11 +0300 schrieb Eli Zaretskii:
>> 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?
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!“ | berberic@fmi.uni-passau.de
(SPD-Stadtrat Kurt Schindler; Regensburg) | www.fmi.uni-passau.de/~berberic
next prev parent reply other threads:[~2007-05-29 21:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-28 10:34 changing encoding of buffer M G Berberich
2007-05-28 20:21 ` Eli Zaretskii
[not found] ` <mailman.1365.1180383723.32220.help-gnu-emacs@gnu.org>
2007-05-29 12:39 ` M G Berberich
2007-05-29 19:52 ` Eli Zaretskii
[not found] ` <mailman.1402.1180468336.32220.help-gnu-emacs@gnu.org>
2007-05-29 21:06 ` M G Berberich [this message]
2007-05-30 3:22 ` Eli Zaretskii
[not found] ` <mailman.1416.1180495357.32220.help-gnu-emacs@gnu.org>
2007-05-30 7:35 ` M G Berberich
2007-05-31 18:19 ` Giorgos Keramidas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=88hui4-np6.ln1@ID-306968.user.individual.net \
--to=berberic@forwiss.uni-passau.de \
--cc=berberic@fmi.uni-passau.de \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).