You are here: Re: Special Characters into database « PHP Programming Language « IT news, forums, messages
Re: Special Characters into database

Posted by The Natural Philosopher on 09/28/63 12:01

� wrote:
>> I think it is easier to store the text raw in the db, and when
>> displaying it in a browser, use htmlentities.
>
> But in this case, should I use iso-8859-1 collation?
>
> Hmm what If I have a site that's visited by users with different
> nationalities and they insert text into database with different
> language charsets?
>
>
>> (Of course, make sure you escape the text before inserting to avoid SQL
>> injection, eg via mysql_real_escape.)
> Thanks for the tip, but my doubt here has nothing to do with
> security. :)
>
>
>> In my opinion that is the cleanest way to store data, and you can also
>> use the data for other purposes, eg searching without having to worry
>> about changed characters because of the htmlentities.
> Thanks for your opinion mate.

I'm with Erwin here as well. Store raw and adapt the display to the user
environment.

Those posting in Chinse, will have Chinese charsets set up.

Those without chinese charsets set up will not probably understand the
chinese anyway..
;-)

 

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

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