Gentoo Archives: gentoo-user

From: Michael Orlitzky <mjo@g.o>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] php database character set
Date: Sun, 25 May 2014 23:32:10
Message-Id: 53827D70.8060509@gentoo.org
In Reply to: [gentoo-user] php database character set by Joseph
1 On 05/25/2014 05:38 PM, Joseph wrote:
2 > My php database, address book is set to (according to phpmyadmin):
3 > Collation: utf8_general_ci
4 >
5
6 The collation determines e.g. how strings are sorted, but that doesn't
7 mean the database supports utf-8 (although MySQL should by default these
8 days).
9
10 Try adding,
11
12 [client]
13 default-character-set = utf8
14
15 [mysqld]
16 character-set-server = utf8
17
18 to your /etc/mysql/my.cnf.
19
20 Then, in mysql, run,
21
22 show create database $your_database;
23
24 This will show you the default character set, like,
25
26 /*!40100 DEFAULT CHARACTER SET utf8 */
27
28 If it says utf8 and you've got those lines in my.cnf, you're in good
29 shape, and your console test (at least) should work. Getting PHP to play
30 along is another adventure, but take it one step at a time.

Replies

Subject Author
Re: [gentoo-user] php database character set Joseph <syscon780@×××××.com>