mysql:9530
From: とみたまさひろ <とみたまさひろ <tommy@xxxxxxxxxx>>
Date: Thu, 3 Jun 2004 23:28:37 +0900
Subject: [mysql 09530] MySQL 4.1.2 の日本語の扱い
とみたです。 昨日の飲み会の席で、話題になった 4.1.2 の文字コードの問題について、 手元の環境で試してみました。 サーバとクライアントの文字コードによって、何やら頑張って変換しようとし てくれているみたいです(余計なお世話?)。 とりあえず、テスト結果です。考察はのちほど…。 [CASE1. mysqld latin1, client latin1 (デフォルト)の場合] Client characterset: latin1_swedish_ci Server characterset: latin1_swedish_ci mysql> create table t (s char(10)); mysql> insert into t (s) values ("あいうえお"); mysql> select * from t; +------------+ | s | +------------+ | あいうえお | +------------+ # od -tx1 t.MYD 0000000 fd a4 a2 a4 a4 a4 a6 a4 a8 a4 aa [CASE2. mysqld latin1, client ujis の場合] Client characterset: ujis_japanese_ci Server characterset: ujis_japanese_ci mysql> create table t2 (s char(10)); mysql> insert into t2 (s) values ("あいうえお"); mysql> select * from t; +------------------------------+ | s | +------------------------------+ | 文字化け | +------------------------------+ mysql> select * from t2; +-------+ | s | +-------+ | ????? | +-------+ # od -tx1 t2.MYD 0000000 fd 3f 3f 3f 3f 3f 20 20 20 20 20 [CASE3. mysqld ujis, client latin1 の場合] Client characterset: latin1_swedish_ci Server characterset: latin1_swedish_ci mysql> create table t3 (s char(10)); mysql> insert into t3 (s) values ("あいうえお"); mysql> select * from t; +------------+ | s | +------------+ | あいうえお | +------------+ mysql> select * from t2; +-------+ | s | +-------+ | ????? | +-------+ mysql> select * from t3; +------------+ | s | +------------+ | あいうえお | +------------+ # od -tx1 t3.MYD 0000000 fd 8f a2 f0 a1 f1 8f a2 f0 8f a2 f0 8f a2 f0 8f 0000020 a2 c3 8f a2 f0 a1 af 8f a2 f0 8f a2 ec 20 20 [CASE4. mysqld ujis, client ujis の場合] Client characterset: ujis_japanese_ci Server characterset: ujis_japanese_ci mysql> create table t4 (s char(10)); mysql> insert into t4 (s) values ("あいうえお"); mysql> select * from t; +------------------------------+ | s | +------------------------------+ | 文字化け | +------------------------------+ mysql> select * from t2; +-------+ | s | +-------+ | ????? | +-------+ mysql> select * from t3; +------------------------------+ | s | +------------------------------+ | 文字化け | +------------------------------+ mysql> select * from t4; +------------+ | s | +------------+ | あいうえお | +------------+ # od -tx1 t4.MYD 0000000 fd a4 a2 a4 a4 a4 a6 a4 a8 a4 aa 20 20 20 20 20 0000020 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 -- とみたまさひろ <tommy@xxxxxxxxxx> 日本MySQLユーザ会 http://www.mysql.gr.jp
-> 9530 2004-06-03 23:28 [とみたまさひろ <tomm] MySQL 4.1.2 の日本語の扱い 9531 2004-06-04 01:51 ┗[とみたまさひろ <tomm] 9533 2004-06-04 08:26 ┣[SUGAWARA Hajime <sug] 9547 2004-06-07 19:25 ┗[<takeshi@xxxxxxxxxx>] 9550 2004-06-07 21:09 ┣["Ryuichiro Munechika] 9556 2004-06-07 22:02 ┃┗[SUGAWARA Hajime <sug] 9573 2004-06-08 11:51 ┃ ┗[Hirofumi Fujiwara <f] 9586 2004-06-10 02:48 ┃ ┗["HIROSE, Masaaki" <h] 9628 2004-06-13 21:50 ┃ ┗[Hirofumi Fujiwara <f] 9578 2004-06-09 08:05 ┣[とみたまさひろ <tomm] 9580 2004-06-09 09:39 ┃┗[<takeshi@xxxxxxxxxx>] 9592 2004-06-11 05:04 ┗[<shuichi@xxxxxxxxxx>] 9596 2004-06-11 11:00 ┣[<shuichi@xxxxxxxxxx>] 9598 2004-06-12 00:16 ┗[<takeshi@xxxxxxxxxx>] 9611 2004-06-12 21:55 ┗[とみたまさひろ <tomm] 9687 2004-06-18 09:40 ┗[<takeshi@xxxxxxxxxx>] 9699 2004-06-23 09:41 ┣[<takeshi@xxxxxxxxxx>] 9728 2004-07-01 11:18 ┗[<takeshi@xxxxxxxxxx>] 9756 2004-07-02 21:14 ┗[<takeshi@xxxxxxxxxx>] 9808 2004-07-10 16:55 ┗[<takeshi@xxxxxxxxxx>] 9839 2004-07-13 14:26 ┗[Shuichi Tamagawa <sh] 9842 2004-07-13 15:12 ┣[Hirofumi Fujiwara <f] 9848 2004-07-14 09:35 ┃┗[<shuichi@xxxxxxxxxx>] 9850 2004-07-14 09:56 ┃ ┗[<takeshi@xxxxxxxxxx>] 9852 2004-07-14 12:25 ┃ ┗[Hirofumi Fujiwara <f] 9854 2004-07-14 13:39 ┃ ┣[<takeshi@xxxxxxxxxx>] 9858 2004-07-14 15:31 ┃ ┃┗[Hirofumi Fujiwara <f] 9860 2004-07-14 16:35 ┃ ┃ ┣[<takeshi@xxxxxxxxxx>] 9867 2004-07-16 02:16 ┃ ┃ ┗[Shuichi Tamagawa <sh] 9863 2004-07-15 11:34 ┃ ┗[<shuichi@xxxxxxxxxx>] 9847 2004-07-14 08:52 ┗[<shuichi@xxxxxxxxxx>] 9849 2004-07-14 09:39 ┗[<takeshi@xxxxxxxxxx>]