You are here: Re: Special characters. « PHP Programming Language « IT news, forums, messages
Re: Special characters.

Posted by Michael Fesser on 08/29/07 00:02

..oO(Defacta)

>Ok, I do
> $body = htmlentities($body, ENT_NOQUOTES, "UTF-8") ;
>And this works...

Shouldn't be necessary.

>Actually there was some troubles because I must do an urlencode of the
>$body variable.

Huh? Why?

Your problem is caused by an improper encoding declaration somewhere. If
you want to use UTF-8, you have to

* store the data in UTF-8 columns in the database
* make sure the connection to the DB uses UTF-8 when inserting and
fetching data
* return the page to the browser with a proper charset parameter in its
HTTP Content-Type header

I'm also wondering about this from your first posting:

| Et voilà que la star de l\'Internet met cette fois la voûte

Where's the backslash coming from? It shouldn't be there. Was it just a
display problem or is it really stored like that in the DB?

Micha

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация