all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Paul Pogonyshev <pogonyshev@gmx.net>
Cc: bug-cc-mode@gnu.org
Subject: Re: `decode-coding-string' question
Date: Fri, 7 Jul 2006 19:05:04 +0300	[thread overview]
Message-ID: <200607071905.04387.pogonyshev@gmx.net> (raw)
In-Reply-To: <uac7lrcz4.fsf@gnu.org>

Eli Zaretskii wrote:
> > To know what character is encoded by this C sequence, I first translate
> > strings "\xc2" and "\xa9" to the appropriate (undecoded!) characters.
> > The resulting string of length 2 is encoded in UTF-8 and I decode it
> > to receive the copyright character or whatever.
> 
> Why not use `(decode-coding-string "\xc2\xa9" 'utf-8)' right away?  It
> gives me the right character directly.

Because you underquoted the string.  It is actually `(decode-coding-string
"\\xc2\\xa9" 'utf-8)' and does nothing...

> Btw, why don't we have a feature in cc-mode to transparently decode
> and encode such strings when the source file is read/written?  If
> detecting the encoding is an issue, we could for starters ask that
> users state that in some file-local variable.

Given that it is not easy to decode strings (and quite slow)...

Paul

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642


  reply	other threads:[~2006-07-07 16:05 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-03 21:35 `decode-coding-string' question Paul Pogonyshev
2006-07-04  0:50 ` Kenichi Handa
2006-07-04  3:27   ` Eli Zaretskii
2006-07-04 17:29     ` Richard Stallman
2006-07-04 15:31   ` Paul Pogonyshev
2006-07-05  0:55     ` Kenichi Handa
2006-07-05 16:11       ` Paul Pogonyshev
2006-07-05 16:34         ` Stuart D. Herring
2006-07-05 16:50           ` Paul Pogonyshev
2006-07-06  1:08         ` Kenichi Handa
2006-07-06 15:52           ` Paul Pogonyshev
2006-07-06 20:18             ` Eli Zaretskii
2006-07-06 20:34               ` Paul Pogonyshev
2006-07-07  9:17                 ` Eli Zaretskii
2006-07-07 16:05                   ` Paul Pogonyshev [this message]
2006-07-07 19:56                     ` David Kastrup
2006-07-07 22:54                       ` Paul Pogonyshev
2006-07-08  8:18                         ` David Kastrup
2006-07-04 12:55 ` Richard Stallman
2006-07-04 13:03   ` David Kastrup
2006-07-04 13:23     ` Johan Bockgård

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=200607071905.04387.pogonyshev@gmx.net \
    --to=pogonyshev@gmx.net \
    --cc=bug-cc-mode@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.