怎么让mysql支持全球语言_转换mysql数据库以支持多种语言

I'd go for it. There are very few reasons not to go with utf8 when working with multiple languages.

The table character set and collation are used as default values for column definitions if the column character set and collation are not specified in individual column definitions.

If you don't have individual collations/character sets on fields, you can write a simple scripts that loops through all tables and issues ALTER TABLE tablename CONVERT TO CHARSET utf8;. If your fields have custom character sets/collations, you'll have to issue a MODIFY COLUMN statement. You can easily identify those querying the information_schema.columns table after your conversion.

Yes, if data cannot be represented in utf8 (which is unlikely given your current collation), data can break. Also, if you stored utf8 text in columns which weren't actually utf8, converting those fields results in something like a double utf8-encoding, which is a pretty inconvenient mess to clean up. If you know a column to be wrongly used to story utf8, you can convert it to bin & then to utf8 to prevent conversion/double encoding.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值