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

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

Re: decode-coding-string question


From: Eli Zaretskii
Subject: Re: decode-coding-string question
Date: Mon, 18 Aug 2008 22:11:37 +0300

> From: Ted Zlatanov <tzz@lifelogs.com>
> Date: Mon, 18 Aug 2008 08:58:55 -0500
> 
> How would you recommend decoding text from particular encodings?  Given
> text like the one shown above in a buffer, only decode-coding-region
> seems to DTRT, and it's not interactive.

If you mean interactively, i.e. you visited a buffer and then
discovered that it was decoded incorrectly, and the actual encoding is
different, then "C-x RET c cp1251 RET M-x revert-buffer RET" should do
what you want, I think.

> Context: I have a file full of CP1251 data and don't want to use Perl's
> Encode module because I'm stubborn and think Emacs should handle it :)

What about the rest of the file? is it encoded in some other encoding?
If not, then the above recipe should do.  If it doesn't, please tell
more details.

> On Fri, 15 Aug 2008 20:06:59 +0400 Dmitry Dzhus <dima@sphinx.net.ru> wrote: 
> 
> DD> That was nitpicking somewhat irrelevant to unibyte-multibyte problem:
> DD> Ted expected to get «нуль», and it's «íóëü», though the string he
> DD> originally provided — «íîëü» — decodes to «ноль»; however, both «нуль»
> DD> and «ноль» mean «zero».
> 
> Yes, I was translating from Russian and knew the text said "zero" but
> didn't remember the correct spelling.

AFAIK, both spellings are right.





reply via email to

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