PHP Coding
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPHP Coding

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today!
  #1  
Old May 6th, 2008, 09:20 AM
trist4king trist4king is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: England
Posts: 63 trist4king User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 h 20 m 4 sec
Reputation Power: 2
Utf8 ereg

hi

i am creating files using utf8 chars such as Регистрация.php which is fine. However i need to ensure no illegal characters are used in the filename such as \*,$&; etc but since php is in ascii and utf8 can be interpreted as ascii I am getting problems when validating using eregi().

i am a bit perplexed!

ta

tbo

Reply With Quote
  #2  
Old May 6th, 2008, 09:34 AM
DavidMR's Avatar
DavidMR DavidMR is offline
Contributing User
Click here for more information.
 
Join Date: Apr 2007
Location: Ireland
Posts: 710 DavidMR User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Week 4 Days 13 h 26 m
Reputation Power: 2
how about using something like :

$your_variable = preg_replace('/[^0-9a-z ]+/i', '', $your_variable);

before...
__________________
When I die, I want to go peacefully like my Grandfather did, in his sleep -- not screaming, like the passengers in his car.

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Coding > Utf8 ereg


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway