FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Rejecting Certain Non-ASCII Characters
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Rejecting Certain Non-ASCII Characters [message #181231 is a reply to message #181230] Mon, 22 April 2013 11:29 Go to previous messageGo to previous message
Thomas 'PointedEars'  is currently offline  Thomas 'PointedEars'
Messages: 701
Registered: October 2010
Karma:
Senior Member
Christoph Becker wrote:

> Thomas 'PointedEars' Lahn wrote:
>> A numeric column is *your* idea. The questions I have answered were the
>> ones that were *actually* asked:
>>
>> | Is there a simple way in PHP to restrict input to the ASCII Character
>> | set, specifically hex 0x20 - 0x7E ? Or a simple way to detect
>> | characters outside this range before committing them to the database?
>
> The OP had reported that users sometimes enter a slashed zero instead of
> a "normal" zero. In a column of type "char" or "varchar" this might not
> matter too much, so I thought the problem might be related to numeric
> columns instead. Therefore, I had written:
>
> | If you're dealing with a numeric column, [...]
> ^^

And again, I was _not_ referring to that. I wrote:

>>> Testing against '/[^\0x00-\x7F]/', and rejecting anything that matches,
>>> appears to be the best approach here.
^^^^^^^^^^^^^^^^^^^^^^^


PointedEars
--
When all you know is jQuery, every problem looks $(olvable).
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: googleapi problem
Next Topic: Undefined variable
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 16:47:02 GMT 2024

Total time taken to generate the page: 0.03657 seconds