[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Emacs 23 character code space
From: |
Eli Zaretskii |
Subject: |
Re: Emacs 23 character code space |
Date: |
Sat, 22 Nov 2008 18:28:13 +0200 |
> From: Kenichi Handa <address@hidden>
> CC: address@hidden, address@hidden
> Date: Mon, 03 Nov 2008 21:45:20 +0900
>
> I tried to rewrite nonascii.texi to clear the things. I
> finished upto the "Character Code" section as attached.
> What do you think about it?
Thanks!
I have a few questions:
Emacs can convert unibyte text to multibyte; it can also convert
multibyte text to unibyte provided that the multibyte text contains
only @acronym{ASCII} and 8-bit characters.
What exactly is meant here by ``8-bit characters''? Do you mean
eight-bit raw bytes, or do you mean Unicode characters whose
codepoints are below 256?
Converting unibyte text to multibyte text leaves @acronym{ASCII}
characters
unchanged, and converts 8-bit characters (codes 128 through 159) to
the corresponding representation for multibyte text.
Again, by ``8-bit characters'' you mean raw 8-bit bytes here, right?
@defun string-to-multibyte string
This function returns a multibyte string containing the same sequence
of characters as @var{string}. If @var{string} is a multibyte string,
it is returned unchanged.
@end defun
I'm not sure I understand the effect of this function. Does it decode
its argument, converting each byte to the corresponding internal
representation of the encoded single-byte character? I think this is
not what it does, but then what does it do?
@defun string-to-unibyte string
This function returns a unibyte string containing the same sequence of
characters as @var{string}. It signals an error if @var{string}
contains a address@hidden character. If @var{string} is a
unibyte string, it is returned unchanged.
@end defun
Since this function handles any non-ASCII characters lossily, when
would it be useful?
@defun multibyte-char-to-unibyte char
This convert the multibyte character @var{char} to a unibyte
character. If @var{char} is a address@hidden character, the
value is -1.
@end defun
@defun unibyte-char-to-multibyte char
This convert the unibyte character @var{char} to a multibyte
character.
@end defun
Again, when are these functions useful?
- Re: Emacs 23 character code space, (continued)
- Re: Emacs 23 character code space, Kenichi Handa, 2008/11/25
- Re: Emacs 23 character code space, Eli Zaretskii, 2008/11/26
- Re: Emacs 23 character code space, Juanma Barranquero, 2008/11/26
- Re: Emacs 23 character code space, Stephen J. Turnbull, 2008/11/26
- Re: Emacs 23 character code space, Kenichi Handa, 2008/11/26
- Re: Emacs 23 character code space, Eli Zaretskii, 2008/11/26
- Re: Emacs 23 character code space, Kenichi Handa, 2008/11/26
- Re: Emacs 23 character code space, Eli Zaretskii, 2008/11/29
- Re: Emacs 23 character code space, Eli Zaretskii, 2008/11/28
- Re: Emacs 23 character code space, Eli Zaretskii, 2008/11/29
- Re: Emacs 23 character code space,
Eli Zaretskii <=
- Re: Emacs 23 character code space, Stefan Monnier, 2008/11/22
- Re: Emacs 23 character code space, Eli Zaretskii, 2008/11/23
- Re: Emacs 23 character code space, Kenichi Handa, 2008/11/25
- Re: Emacs 23 character code space, Ulrich Mueller, 2008/11/23
- Re: Emacs 23 character code space, Eli Zaretskii, 2008/11/23
- Re: Emacs 23 character code space, Ulrich Mueller, 2008/11/23
- Re: Emacs 23 character code space, Stefan Monnier, 2008/11/23
- Re: Emacs 23 character code space, Kenichi Handa, 2008/11/25
- New function: what-file-line, used when writing gdb script, richardeng, 2008/11/22
Re: Emacs 23 character code space, Kenichi Handa, 2008/11/07