Page 1 of 1

Enable UTF8 support for PCRE

Posted: Thu Oct 09, 2008 10:59 am
by orware
I was recently trying out a new application but wasn't receiving the results I was expecting and after taking a look at my error logs it would appear that PHP's Perl Compatible Regular Expression extension was not compiled with UTF8 support which my application requires.

So it seems like it would be fairly straightforward, but I wanted to know what I would need to do to enable utf8 support when upgrading through yum and the ART repository?

Would it be something like:
yum update php --enable-utf8 or is it more complicated than that?

The procedure is what I'd like to get squared away :-).

Thanks!

PCRE Unicode Properties Support

Posted: Thu Oct 09, 2008 12:40 pm
by orware
I ran the following command from the command line:
pcretest -C

And received the following output:
PCRE version 4.5 01-December-2003
Compiled with
UTF-8 support
Newline character is LF
Internal link size = 2
POSIX malloc threshold = 10
Default match limit = 10000000
Match recursion uses stack

But, I learned about this command after reading this thread:
http://www.linux-archive.org/centos/118 ... cre-2.html
(you will have to scroll down about halfway to the post at 07-09-2008, 05:27 PM by Amitava Shee)

And on an Ubuntu system that did work for that person they had received the following output from pcretest:
Compiled with
* UTF-8 support
* Unicode properties support
* Newline sequence is LF
* R matches all Unicode newlines

* Internal link size = 2
* POSIX malloc threshold = 10
* Default match limit = 10000000
* Default recursion depth limit = 10000000
* Match recursion uses stack

The difference is the Unicode Properties Support in the Ubuntu system that seems to be required.

Any help on how I could add the Unicode Properties support into PCRE?