|
Posted by "Richard Lynch" on 10/21/36 11:31
On Sat, November 5, 2005 3:02 pm, Andy Pieters wrote:
> Hi List
>
> I am doing some data validation and the following regexp fails
>
> [\W]
>
> When using characters like £ or â¬
>
> Obviously because they are technically more then one character, even
> though
> they are only displayed as one.
>
> The script is encoded in UTF-8
>
> Anybody know a fix for this?
You could use http://php.net/utf8_decode on it first, and then
validate...
I dunno if that would allow any nasties to get past, but it least it
should validate the input as "legal" I think...
I always feel overwhelmed by all this multi-lingual character-encoding
multi-byte stuff, frankly.
--
Like Music?
http://l-i-e.com/artists.htm
[Back to original message]
|