Re: [pcre-dev] Problem with Unicode codepoints in hex

Kezdőlap
Üzenet törlése
Szerző: Philip Hazel
Dátum:  
Címzett: Jean-Christophe Deschamps
CC: pcre-dev
Tárgy: Re: [pcre-dev] Problem with Unicode codepoints in hex
On Fri, 1 Jul 2011, Jean-Christophe Deschamps wrote:

>   re> /abc[\x2000-\x200A]*/
> Failed: range out of order in character class at offset 14
>   re> /abc[\x{2000}-\x{200A}]*/
> Failed: character value in \x{...} sequence is too large at offset 11
>
> It seems to me that hex codepoints have a problem.
> Or is it me?


You need to add the "8" modifier to tell PCRE to run in UTF-8 mode. Try
this:

/abc[\x{2000}-\x{200A}]*/8
                         ^
                         ^
                         ^


Philip

--
Philip Hazel