[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Solved] RE: Differences between identical strings in Emacs lisp
From: |
Eli Zaretskii |
Subject: |
Re: [Solved] RE: Differences between identical strings in Emacs lisp |
Date: |
Wed, 08 Apr 2015 14:59:51 +0300 |
> From: Jürgen Hartmann <juergen_hartmann_@hotmail.com>
> Date: Wed, 8 Apr 2015 13:01:16 +0200
>
> >> [About mapping between unibyte and multibyte strings]
> >>
> >> First I thought that some hidden decoding based on some charsets or
> >> coding
> >> systems occurs.
> >
> > Actually, some sort of "decoding" does occur, albeit perhaps not in
> > the use cases you tried -- Emacs will sometimes silently convert
> > unibyte characters to their locale-dependent multibyte equivalents.
>
> On which occasion such a conversion is done?
One example that comes to mind is (insert 160), i.e. when inserting
text into a buffer. There are other examples, but I simply don't
remember them at the moment.
> Has this anything to do with the the charset that is individually
> defined in language-info-alist for nearly each language environment?
No, I think Emacs converts the value to the character that has the
same Unicode codepoint.
> It seems that all my related observations that puzzled me before can be well
> explained by the strict distinction between characters and raw bytes and the
> mapping between the latter's integer representations in the range
> [0x80..0xFF] in an unibyte context and in the range [0x3FFF80..0x3FFFFF] in a
> multibyte context.
Pretty much, yes.
- Differences between identical strings in Emacs lisp, Jürgen Hartmann, 2015/04/06
- Re: Differences between identical strings in Emacs lisp, Pascal J. Bourguignon, 2015/04/06
- [Solved] RE: Differences between identical strings in Emacs lisp, Jürgen Hartmann, 2015/04/07
- Re: [Solved] RE: Differences between identical strings in Emacs lisp, Eli Zaretskii, 2015/04/07
- RE: [Solved] RE: Differences between identical strings in Emacs lisp, Jürgen Hartmann, 2015/04/07
- Re: [Solved] RE: Differences between identical strings in Emacs lisp, Eli Zaretskii, 2015/04/07
- RE: [Solved] RE: Differences between identical strings in Emacs lisp, Jürgen Hartmann, 2015/04/08
- Re: [Solved] RE: Differences between identical strings in Emacs lisp,
Eli Zaretskii <=
- Re: [Solved] RE: Differences between identical strings in Emacs lisp, Stefan Monnier, 2015/04/08
- RE: [Solved] RE: Differences between identical strings in Emacs lisp, Jürgen Hartmann, 2015/04/09
- Re: [Solved] RE: Differences between identical strings in Emacs lisp, Stefan Monnier, 2015/04/09
- Re: [Solved] RE: Differences between identical strings in Emacs lisp, Eli Zaretskii, 2015/04/09
- Re: [Solved] RE: Differences between identical strings in Emacs lisp, Richard Wordingham, 2015/04/09
- Re: [Solved] RE: Differences between identical strings in Emacs lisp, Stefan Monnier, 2015/04/10
- RE: [Solved] RE: Differences between identical strings in Emacs lisp, Jürgen Hartmann, 2015/04/10
- RE: [Solved] RE: Differences between identical strings in Emacs lisp, Jürgen Hartmann, 2015/04/09
- Re: [Solved] RE: Differences between identical strings in Emacs lisp, Thien-Thi Nguyen, 2015/04/08
- RE: [Solved] RE: Differences between identical strings in Emacs lisp, Jürgen Hartmann, 2015/04/09