[nycphp-talk] PCRE, utf8, Exceptions and you
csnyder
chsnyder at gmail.com
Mon Apr 16 12:49:21 EDT 2007
On 4/14/07, Mark Armendariz <lists at enobrev.com> wrote:
> I suppose I could capture the error with an error handler and try to figure
> out if it was the error I'm looking for, but that seems so messy and
> potentially unreliable. Aren't we supposed to be able to use exceptions for
> this sort of thing in php5+?
5.2 introduced recoverable errors, I believe those can be caught...
doc is spotty on this though.
A warning is just a warning, so can't be caught, though it can be supressed.
If you haven't already solved this problem, I would suggest a test
where you try compiling a very simple preg_match using the unicode
codes, suppress any warnings with @, and see if you get the expected
result. If you do, proceed with unicode, if not log and fall back to
ascii.
--
Chris Snyder
http://chxo.com/
More information about the talk
mailing list