简体   繁体   English

如何知道存储在MySQL表字段中的文本的实际编码?

[英]How to know the actual codification of a text stored in a MySQL table field?

I have a very simple question. 我有一个非常简单的问题。 I just need to determine the codification (UTF8, latin1) of a text stored in a MYSQL table field. 我只需要确定存储在MYSQL表字段中的文本的编码(UTF8,latin1)。

我使用了SELECT COLLATION(column) FROM table LIMIT 1;

Well, the data will be stored according to the charset and collation settings that were in effect at the time the data was stored. 好了,数据将根据存储数据时生效的charsetcollation设置进行存储。

Which charset and collation values are used for a given piece of data can come from any one of four places 给定数据使用哪些charsetcollation值可以来自四个位置中的任何一个

  1. Server Settings 服务器设定
  2. Database Settings 数据库设置
  3. Table Settings 表格设定
  4. Column Settings 栏设定

All this information is discoverable through querying the INFORMATION_SCHEMA database 通过查询INFORMATION_SCHEMA数据库可以发现所有这些信息

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM