help-gnu-emacs
[Top][All Lists]
Advanced

[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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]