1 |
On 05/25/14 19:32, Michael Orlitzky wrote: |
2 |
>On 05/25/2014 05:38 PM, Joseph wrote: |
3 |
>> My php database, address book is set to (according to phpmyadmin): |
4 |
>> Collation: utf8_general_ci |
5 |
>> |
6 |
> |
7 |
>The collation determines e.g. how strings are sorted, but that doesn't |
8 |
>mean the database supports utf-8 (although MySQL should by default these |
9 |
>days). |
10 |
> |
11 |
>Try adding, |
12 |
> |
13 |
> [client] |
14 |
> default-character-set = utf8 |
15 |
> |
16 |
> [mysqld] |
17 |
> character-set-server = utf8 |
18 |
> |
19 |
>to your /etc/mysql/my.cnf. |
20 |
> |
21 |
>Then, in mysql, run, |
22 |
> |
23 |
> show create database $your_database; |
24 |
> |
25 |
>This will show you the default character set, like, |
26 |
> |
27 |
> /*!40100 DEFAULT CHARACTER SET utf8 */ |
28 |
> |
29 |
>If it says utf8 and you've got those lines in my.cnf, you're in good |
30 |
>shape, and your console test (at least) should work. Getting PHP to play |
31 |
>along is another adventure, but take it one step at a time. |
32 |
|
33 |
In /etc/mysql/my.cnf |
34 |
I have them as default |
35 |
|
36 |
[client] |
37 |
default-character-set = utf8 |
38 |
|
39 |
[mysqld] |
40 |
character-set-server = utf8 |
41 |
|
42 |
|
43 |
-- |
44 |
Joseph |