best character set and collation for storing Tags, and URLs in MySQL DB

核能气质少年 提交于 2019-12-11 10:52:49

问题


I'm retrieving photos info from Flickr into my site. For each photo, the URL, title, and tags are saved in MySQL database.

I read a lot about the most suited character set for such values and I found its mostly between using utf8 or latin1.

Some titles and tags include symbols like the copyright (or similar ones). Will I be OK with Latin1 character set?


回答1:


Never use utf-8 in your database if the stored text is 100% ascii. Bloating each character with utf-8 could imply a significant performance hit if the text is indexed.




回答2:


Always use utf-8, everywhere, in your database, text editor, html metas, charset headers....

This is the only advice I can give you.



来源:https://stackoverflow.com/questions/15260216/best-character-set-and-collation-for-storing-tags-and-urls-in-mysql-db

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!