Go Back   Cyber Tech Help Support Forums > Software > Web Development & Graphic Design

Notices

Reply
 
Topic Tools
  #1  
Old August 17th, 2007, 01:17 PM
FrEaKmAn FrEaKmAn is offline
Senior Member
 
Join Date: Aug 2005
Posts: 477
Question PHP searching

Hi

I have problem with specials symbols, like č,š,ž. How to I convert them so that searching in db is possible?

if we take example letter - š. In database is stored like š and š in link converts to %B9. I tried str_replace but doesn't work, no results, even though everything else works (standard characters). But the bigger problem is that Ž is converted to ® and ž to ¾. Should I change input so this is converted to ascii?
Reply With Quote
  #2  
Old August 17th, 2007, 07:38 PM
Buzz's Avatar
Buzz Buzz is offline
Cyber Tech Help Moderator
 
Join Date: Sep 2000
O/S: MacOS
Location: Oregon, USA
Posts: 3,324
I would absolutely store all odd glyphs as ascii before insertion.
__________________
Scott
Moderator : Macintosh : Website & Graphics
Adobe Certified Expert: Illustrator
Royalty-Free Vector Stock Art
Reply With Quote
  #3  
Old August 17th, 2007, 08:52 PM
FrEaKmAn FrEaKmAn is offline
Senior Member
 
Join Date: Aug 2005
Posts: 477
and I did this, because then I can use this in search. But I have different problem. I'm using charset UTF-8, which is as I know the most common. All ascii symbols work now, but in source code I see them as ascii, so č, but on page I see letter č. I'm little bit worried and I would like that it's converted somehow in source code, because if I use ascii in maybe define(), it's converted nicely also in source code.
Reply With Quote
  #4  
Old August 20th, 2007, 12:22 AM
FrEaKmAn FrEaKmAn is offline
Senior Member
 
Join Date: Aug 2005
Posts: 477
I checked the source code of this forum and it's built same as my cms, so if it works here, it will work also for me..

can somebody at least point me to where I can get some info about link converting like blank space is in url converted to %20 and I have strange felling that I'm always finding new ones for my symbols...
Reply With Quote
  #5  
Old August 20th, 2007, 03:27 AM
Buzz's Avatar
Buzz Buzz is offline
Cyber Tech Help Moderator
 
Join Date: Sep 2000
O/S: MacOS
Location: Oregon, USA
Posts: 3,324
http://www.asciitable.com/
__________________
Scott
Moderator : Macintosh : Website & Graphics
Adobe Certified Expert: Illustrator
Royalty-Free Vector Stock Art
Reply With Quote
  #6  
Old August 22nd, 2007, 08:09 PM
FrEaKmAn FrEaKmAn is offline
Senior Member
 
Join Date: Aug 2005
Posts: 477
I have also found this

http://www.nightwing.com.au/Webdesign/symbols.html

What about symbols like

Č, Ć, š etc

I'm getting this symbols when I'm inputting, can I somehow obtain them in better way, because right now I'm making a list in function and I'm always finding new symbols I need to convert and it's driving me crazy

Last edited by FrEaKmAn; August 23rd, 2007 at 06:42 PM.
Reply With Quote
  #7  
Old August 24th, 2007, 06:09 PM
FrEaKmAn FrEaKmAn is offline
Senior Member
 
Join Date: Aug 2005
Posts: 477
one question

if I use this function, this is for letter š

str_replace(chr(154), 'š', $text);

1. Why is this working only with charset iso-8859-1
2. If I convert this, won't there be a possibility for security whole, as symbols &, # can mess something up, or not??
Reply With Quote
  #8  
Old August 28th, 2007, 11:54 AM
FrEaKmAn FrEaKmAn is offline
Senior Member
 
Join Date: Aug 2005
Posts: 477
does anybody know how to convert nonstandard characters to standard ones?

č => c
š => s

etc
Reply With Quote
Reply

Bookmarks

Topic Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:11 AM.

[ RSS ]