|
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]
|