[Top][All Lists]

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

bug#4209: 23.1; Emacs 23.1 regression in re-search-forward

From: Kenichi Handa
Subject: bug#4209: 23.1; Emacs 23.1 regression in re-search-forward
Date: Thu, 28 Jan 2010 10:18:55 +0900

In article <address@hidden>, Stefan Monnier <address@hidden> writes:

> The preceding comment keeps me puzzled.  I thought that we only ever
> matched re_patterns and buffers of the same multibyteness, i.e. if
> a unibyte regexp is matched against a multibyte buffer it should first
> be turned into a multibyte regexp and then re_compiled, so the case of:

Before we changed the behavour of unibyte->multibyte
conversion, that conversion depended on the preferred
charset (thus on lang. env.).  But, Emacs 22 wrongly cached
the pattern converted at some point, and reused it without
checking the change of preferred charset.

So, in emacs-unicode branch, I fixed the regex code so that
unibyte pattern can be directry used for multibyte buffer
search by doing unibyte->multibyte conversion on the fly.
And that code was merged to trunk.


>                 /* For the case of matching this unibyte regex
>                    against multibyte, we must set a leading code of
>                    the corresponding multibyte character.  */

really happens.

Kenichi Handa

reply via email to

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