[Top][All Lists]
[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: |
Fri, 07 Jul 2006 12:17:03 +0300 |
> From: Paul Pogonyshev <address@hidden>
> Date: Thu, 6 Jul 2006 23:34:21 +0300
> Cc: address@hidden
>
> There is indeed a misunderstanding. The characters in the buffer _are_
> decoded. However the characters form C escape sequence, like "\xc2\xa9"
Right, I see the problem now.
> 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.
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.
- Re: `decode-coding-string' question, (continued)
- Re: `decode-coding-string' question, Paul Pogonyshev, 2006/07/04
- Re: `decode-coding-string' question, Kenichi Handa, 2006/07/05
- Re: `decode-coding-string' question, Paul Pogonyshev, 2006/07/06
- Re: `decode-coding-string' question, Eli Zaretskii, 2006/07/06
- Re: `decode-coding-string' question, Paul Pogonyshev, 2006/07/06
- Re: `decode-coding-string' question,
Eli Zaretskii <=
- Re: `decode-coding-string' question, Paul Pogonyshev, 2006/07/07
- Re: `decode-coding-string' question, David Kastrup, 2006/07/07
- Re: `decode-coding-string' question, Paul Pogonyshev, 2006/07/07
- Re: `decode-coding-string' question, David Kastrup, 2006/07/08
Re: `decode-coding-string' question, Richard Stallman, 2006/07/04