Code Monkey home page Code Monkey logo

Comments (4)

osheroff avatar osheroff commented on September 23, 2024

Hmmm, I can't reproduce this, at least not trivially. Can you give me:

  • the mysql server version
  • the character encoding and data type of the column
  • the output of:
select 
   columns.name, columns.encoding as column_encoding, 
   tables.encoding as table_encoding, databases.encoding as database_encoding, 
   schemas.encoding as schema_encoding 
from maxwell.columns 
join maxwell.tables on tables.id = columns.table_id 
join maxwell.databases on maxwell.databases.id = tables.database_id 
join maxwell.schemas on maxwell.schemas.id = databases.schema_id 
where columns.name = 'col';

thanks.

from maxwell.

yester354 avatar yester354 commented on September 23, 2024

@osheroff
Hi ,in my environment. the maxwell and mysql are in the same machine.my mysql version is 5.1.71
the out put of the sql is:
mysql> select columns.name, columns.encoding as column_encoding, tables.encoding as table_encoding, databases.encoding as database_encoding, schemas.encoding as schema_encoding from maxwell.columns join maxwell.tables on tables.id = columns.table_id join maxwell.databases on maxwell.databases.id = tables.database_id join maxwell.schemas on maxwell.schemas.id = databases.schema_id where columns.name = 'col';
+------+-----------------+----------------+-------------------+-----------------+
| name | column_encoding | table_encoding | database_encoding | schema_encoding |
+------+-----------------+----------------+-------------------+-----------------+
| col | utf8 | utf8 | utf8 | utf8 |
| col | latin1 | latin1 | utf8 | utf8 |
| col | NULL | latin1 | utf8 | utf8 |
| col | NULL | latin1 | utf8 | utf8 |
+------+-----------------+----------------+-------------------+-----------------+
4 rows in set (0.00 sec)

the mysql database character is utf8
mysql> commit;
Query OK, 0 rows affected (0.00 sec)

mysql> show create database emon;
+----------+---------------------------------------------------------------+
| Database | Create Database |
+----------+---------------------------------------------------------------+
| emon | CREATE DATABASE emon /*!40100 DEFAULT CHARACTER SET utf8 */ |
+----------+---------------------------------------------------------------+
1 row in set (0.00 sec)

mysql>

and the table character set utf8
mysql> show table status like '%emon%';
+------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-----------------+----------+----------------+---------+
| Name | Engine | Version | Row_format | Rows | Avg_row_length | Data_length | Max_data_length | Index_length | Data_free | Auto_increment | Create_time | Update_time | Check_time | Collation | Checksum | Create_options | Comment |
+------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-----------------+----------+----------------+---------+
| emon | InnoDB | 10 | Compact | 3 | 5461 | 16384 | 0 | 0 | 9437184 | NULL | 2015-08-25 09:36:33 | NULL | NULL | utf8_general_ci | NULL | | |
+------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-----------------+----------+----------------+---------+
1 row in set (0.00 sec)

mysql>

and it can display chinese in mysql normally
mysql> select * from emon;
+--------+
| col |
+--------+
| |
| 测试 |
| 哈哈 |
+--------+

my server character set as below
[root@localhost goldengate]# locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

thanks for you replay

from maxwell.

osheroff avatar osheroff commented on September 23, 2024

sorry, can you add `AND tables.name = 'emon`` to the first SQL statement? I want to see what encoding maxwell thinks the table has...

also, can you do SHOW CREATE TABLE emon? that might give better info than "show table status"

from maxwell.

yester354 avatar yester354 commented on September 23, 2024

Hi
it's ok now .it's the problem of the secureCRT settings .now it can display chinese well. thanks very much

from maxwell.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.