Charset and special symbols

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
FrEaKmAn
Forum Newbie
Posts: 3
Joined: Fri Aug 24, 2007 4:18 pm

Charset and special symbols

Post by FrEaKmAn »

Hi

New to DevNetwork forums, I'm hoping you can help me. So my language includes symbols like č,š,ž etc. Now I'm not so sure how to input them, I set charset to UTF-8, collation in db is utf8_unicode_ci but symbols get converted to some strange ones in db. So I was wondering that I convert them into ascii (č, š,ž) so that I can process them. How should I do this? if I use html_entity_decode(), then I need to change charset to iso-8859-1, which isn't big problem, but the thing is that all symbols are not converted, symbols like š, ž etc...

I checked around and I looked into cms drupal and now I'm wondering how did they managed to use utf-8 charset, but still inputs stay unchanged, so if we insert č,š,ž it shows č,š,ž in database and this would be perfect for me.

Any help with this or maybe advice me good solution? thanks
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Post by Christopher »

The easy way is to use "charset=iso-8859-1".
(#10850)
FrEaKmAn
Forum Newbie
Posts: 3
Joined: Fri Aug 24, 2007 4:18 pm

Post by FrEaKmAn »

yes I'm thinking to use this, but still I'd like to know how to make it work with utf-8
FrEaKmAn
Forum Newbie
Posts: 3
Joined: Fri Aug 24, 2007 4:18 pm

Post by FrEaKmAn »

what about function urldecode(), the problem is that this works only with UTF-8 :(
Post Reply