从 latin_swedish_ci 检索内容并将其存储到 utf8_general_ci [英] Retrieve content from latin_swedish_ci and store it into utf8_general_ci

查看:59
本文介绍了从 latin_swedish_ci 检索内容并将其存储到 utf8_general_ci的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从 latin_swedish_ci 中检索内容并将其存储到 utf8_general_ci 中.它会破坏我现有内容中的任何字符吗?

I want to retrieve content from latin_swedish_ci and store it into utf8_general_ci. Does it breaks any character in my existing content ??

推荐答案

不,从 latin_swedish_ci 转换为 utf8_general_ci 不会有任何问题,因为 utf8_general_ci 中的所有字符a href="http://collat​​ion-charts.org/mysql60/mysql604.dec8_swedish_ci.html" rel="nofollow">latin_swedish_ci 也可以在 utf8.仅当源归类中存在目标归类中不存在的字符时才会出现问题.

No, you won't have any issues converting from latin_swedish_ci to utf8_general_ci because all characters in latin_swedish_ci are also available in utf8. Problems only arise when there are characters in the source collation that do not exist in the destination collation.

然而,以另一种方式转换会产生问题,因为有许多字符无法直接转换,因为它们不存在于 latin_swedish_ci 中.如果在这种情况下,您可以将它们(例如)存储为相应的 HTML 实体而不是实际字符.选择合适的字符编码当然是更好的答案.

Converting the other way, however, will create problems because there are many characters that won't be able to be converted directly since they don't exist in latin_swedish_ci. If ever in that situation, you could store them (for example) as their corresponding HTML entities instead of the actual characters. Choosing an appropriate character encoding, of course, would be the better answer.

这篇关于从 latin_swedish_ci 检索内容并将其存储到 utf8_general_ci的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆