[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: using empty_string as the only "" string
From: |
Stefan Monnier |
Subject: |
Re: using empty_string as the only "" string |
Date: |
Wed, 25 Apr 2007 12:07:29 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.94 (gnu/linux) |
> For example, if I want to make multibyte "ÀÈ", I would like to use
> (string-to-multibyte (concat "\300" "\310")) => "\xc0\xc8" (why ?)
See the docstring of string-to-multibyte: it's basically equivalent to
(decode-coding-string STRING 'binary).
If you want your unibyte string interpreted as a latin-1 encoded text, then
say so explicitly:
(decode-coding-string (concat "\300" "\310") 'latin-1) => "ÀÈ"
> (concat (string-as-multibyte "\300") (string-as-multibyte "\310")) =>
> "\xc0\xc8" (why ?)
If you don't know, then please pretty please, stay away from
string-as-multibyte.
Stefan
- Re: Using empty_string as the only "" string, (continued)
- Re: Using empty_string as the only "" string, Stefan Monnier, 2007/04/24
- Re: Using empty_string as the only "" string, Richard Stallman, 2007/04/24
- Re: using empty_string as the only "" string, dmantipov, 2007/04/25
- Re: using empty_string as the only "" string, Richard Stallman, 2007/04/26
- Re: using empty_string as the only "" string, Dmitry Antipov, 2007/04/26
- Re: using empty_string as the only "" string, Richard Stallman, 2007/04/27
- Re: using empty_string as the only "" string, Dmitry Antipov, 2007/04/27
- Re: using empty_string as the only "" string, David Kastrup, 2007/04/27
- Re: using empty_string as the only "" string, Richard Stallman, 2007/04/28
- Re: using empty_string as the only "" string, Dmitry Antipov, 2007/04/28
- Re: using empty_string as the only "" string, Richard Stallman, 2007/04/28