emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: eight-bit char handling in emacs-unicode


From: Stefan Monnier
Subject: Re: eight-bit char handling in emacs-unicode
Date: 19 Nov 2003 08:48:54 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

>> Now to tell you the truth, my change had to accept a few (not so) special
>> cases and it took a bit of fiddling to make the code lenient enough to
>> accept elisp code I didn't feel like "fixing".  I can't remember the details
>> off-hand, but I remember having problems with regexp matching functions
>> where multibyte regexps are used in unibyte buffers.

> Do you mean unibyte regexps in multibyte buffers?  For example,

No: multibyte is a superset of unibyte, so there's no problem searching
for unibyte elements in a multibyte sequence.

> currently gnus/message.el has a wrong regexp than prevents the Gnus
> from using in some language environments.  To repeat this bug,
> you can eval the following:

> (progn
>  (set-language-environment 'ukrainian)
>  (re-search-forward "[\000-\007\013\015-\032\034-\037\200-\237]" nil t))

In my Emacs this doesn't fail because the unibyte string is turned into
multibyte without looking at the coding-system (i.e. it will only match
ASCII and chars from eight-bit-control or eight-bit-graphic: probably not
what the author's intended).


        Stefan




reply via email to

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