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

Posted by Willem Bogaerts on 09/28/47 12:01

> And this:
>> Right, so if I want to support this kind of characters my:
>>
>> * mysql charset
>> * mysql connection collation
>> * table collation's
>
> Is it correct?

In effect, there are really two things in MySQL that "have" encodings:
individual fields and connections. Most of the rest is just a default.
The database encoding and the table encoding are just the default to use
for the fields that are created. The connection encoding is used to see
if any conversion is needed.

Assuming you are using a moderately recent version of MySQL, you start
with sending the encoding just after opening the connection, like:
SET NAMES utf8;

Now, MySQL assumes your client software is speaking in utf8 encoding. If
you use utf-8 encoded fields as well (for instance by only specifying
the utf-8 encoding on the CREATE DATABASE statement) all should work on
the database side.

On the webserver side, you should do the same. In the htmlentities()
function, you can pass an encoding. Please note that a lot of systems
come with encodings: your OS, e-mail, PDF generators, etc. Some have
only one encoding, others can be told what encoding should be used.

Good luck,
--
Willem Bogaerts

Application smith
Kratz B.V.
http://www.kratz.nl/

 

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

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