all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: decode-coding-string question
Date: Mon, 18 Aug 2008 22:11:37 +0300	[thread overview]
Message-ID: <u3al25eae.fsf@gnu.org> (raw)
In-Reply-To: <86vdxyxw4g.fsf@lifelogs.com>

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





  parent reply	other threads:[~2008-08-18 19:11 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-14 21:02 decode-coding-string question Ted Zlatanov
2008-08-14 22:19 ` Dmitry Dzhus
2008-08-15  7:37   ` Eli Zaretskii
2008-08-15 15:54   ` Ted Zlatanov
2008-08-15 17:04     ` Eli Zaretskii
     [not found]     ` <mailman.16821.1218819933.18990.help-gnu-emacs@gnu.org>
2008-08-18 13:58       ` Ted Zlatanov
2008-08-18 16:09         ` Nikolaj Schumacher
2008-08-18 17:45         ` David Golden
2008-08-18 19:11         ` Eli Zaretskii [this message]
2008-08-19  8:34           ` Kevin Rodgers
     [not found]         ` <mailman.16993.1219086714.18990.help-gnu-emacs@gnu.org>
2008-08-18 20:07           ` Ted Zlatanov
2008-08-18 23:01             ` David Golden
2008-08-19 13:48               ` Ted Zlatanov
     [not found]   ` <mailman.16762.1218785885.18990.help-gnu-emacs@gnu.org>
2008-08-15 16:06     ` Dmitry Dzhus
2008-08-14 22:20 ` David Golden

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=u3al25eae.fsf@gnu.org \
    --to=eliz@gnu.org \
    --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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.