MySQL Forums
Forum List  »  Install & Repo

default character set (UTF-8)
Posted by: Łukasz Korona
Date: April 12, 2010 05:25AM

Hi,

I have a problem with default character set. I have XAMPP 1.7.3 installed on WinXP. Despite the default-character-set=utf8 entries for both server and client, i can't insert and display properly polish special chars. Only when I call mysql_query('SET NAMES utf8'); from PHP script, dicretics became correct. I even replaced mysql installation folder by new installation from http://dev.mysql.com/downloads/mysql/ - (community server) Windows (x86, 32-bit), MSI Installer - (mysql-5.1.45-win32.msi) which has "default character set" option during installation and i of course set it to utf-8 but it didn't help. In php.ini there is also entry "default_charset = utf-8"

Please help, I'm running out of ideas.

Here are part of my.ini and results of some commands like STATUS and SHOW VARIABLES LIKE 'char%' :

my.ini:

[client]
#user = your_username
#password = your_password
host = .
port = 3306
socket = "MySQL"

[mysql]
default-character-set=utf8
# Here follows entries for some specific programs

# The MySQL server
[mysqld]
skip-character-set-client-handshake
default-character-set=utf8
basedir = "/xampp/mysql/"
datadir = "/xampp/mysql/data/"
port = 3306
socket = "MySQL"
skip-locking
key_buffer = 16M
max_allowed_packet = 1M
table_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M

default-time-zone = "SYSTEM"

log_error = "/xampp/mysql/data/mysql.err"
pid_file = "mysql.pid"
general_log = 0
general_log_file = "/xampp/mysql/data/mysql.log"
slow_query_log = 0
slow_query_log_file = "/xampp/mysql/data/mysql-slow.log"

mysql> status
--------------
mysql Ver 14.14 Distrib 5.1.41, for Win32 (ia32)

Connection id: 1
SSL: Not in use
Using delimiter: ;
Server version: 5.1.41 Source distribution
Protocol version: 10
Connection: localhost via TCP/IP
Client characterset: latin1
Server characterset: latin1
TCP port: 3306
Uptime: 9 sec

Threads: 1 Questions: 4 Slow queries: 0 Opens: 15 Flush tables: 1 Open tabl
es: 8 Queries per second avg: 0.444
--------------

mysql> show variables like 'char%' ;
+--------------------------+------------------------------+
| Variable_name | Value |
+--------------------------+------------------------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | utf8 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| character_sets_dir | \xampp\mysql\share\charsets\ |
+--------------------------+------------------------------+
8 rows in set (0.00 sec)

Options: ReplyQuote


Subject
Written By
Posted
default character set (UTF-8)
April 12, 2010 05:25AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.