Welcome! Log In Create A New Profile

Advanced

Re: problem with PCRE matching, utf-8, Greek, rewrite

Maxim Dounin
July 01, 2010 01:18PM
Hello!

On Thu, Jul 01, 2010 at 11:33:49AM -0400, tmanolat wrote:

> Dear all,
> I try to implement some rewrites using regular expressions and my URIs
> will contain Greek characters.
>
> Trials of the REs are going ok when tested with pcretest:
>
> [code]
> [root@localhost ~]# pcretest
> PCRE version 8.10 2010-06-25
>
> re> #^[\x{0386}-\x{03FF}]+$#8
> data> bv
> No match
> data> Τηλέ
> 0: \x{3a4}\x{3b7}\x{3bb}\x{3ad}
>
> [/code]
> note the 8 modifier that actually tells PCRE to do a UTF-8 matching.
>
>
> Having the RE in nginx.config complains about
> [code]
> [emerg]: pcre_compile() failed: character value in \x{...} sequence is
> too large in
> [/code]
> which I guess means that somehow nginx calls PCRE without the PCRE_UTF8
> option flag
>
> Am I right? How can I implement these Greek character URL rewrites?

Using (*UTF8) to switch pcre into utf-8 mode should work find in
both nginx and pcretest. See man pcresyntax for details.

Maxim Dounin

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

problem with PCRE matching, utf-8, Greek, rewrite

tmanolat July 01, 2010 11:33AM

Re: problem with PCRE matching, utf-8, Greek, rewrite

Maxim Dounin July 01, 2010 01:18PM

Re: problem with PCRE matching, utf-8, Greek, rewrite

tmanolat July 02, 2010 03:48AM

Re: problem with PCRE matching, utf-8, Greek, rewrite

flickhorn September 23, 2010 03:46AM

Re: problem with PCRE matching, utf-8, Greek, rewrite

tmanolat September 23, 2010 05:12AM

Re: problem with PCRE matching, utf-8, Greek, rewrite

mat h September 23, 2010 04:02AM

Re: problem with PCRE matching, utf-8, Greek, rewrite

mat h September 24, 2010 09:48PM

Re: problem with PCRE matching, utf-8, Greek, rewrite

Maxim Dounin September 25, 2010 05:20AM

Re: problem with PCRE matching, utf-8, Greek, rewrite

tmanolat September 25, 2010 10:46AM

Re: problem with PCRE matching, utf-8, Greek, rewrite

Weibin Yao July 01, 2010 10:16PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 314
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready