MySQL collation for Portugese

三世轮回 提交于 2020-01-16 00:42:05

问题


Is there a way in MySQL to have character collated as per the Portugese language? In the same way there is utf8_spanish_ci or Spanish. Or is there a way to add new collations?

There are the following characters:

ç (Gonçalves)
ã (Guimarães)
õ (Simões)
â (Tânger)
ô (Pôrto)
ê (Gouvêa)
é (Féria)
í (Vinícius)
ó (Grijó)
ú (Araújo)
á (Tomás)
ñ (Núñez)

When using utf8_general_ci searching for 'Gonçalves' would also return 'Goncalves'. I need these to be treated separately by MySQL.


回答1:


Please check for the collation and character set. This is an example create statement for accepting Portugese characters.

CREATE DATABASE dansih_db CHARACTER SET latin1 COLLATE latin1_danish_ci;

try altering Character Sets and Collation in you DB Example output for above character set and collation

[



来源:https://stackoverflow.com/questions/47507251/mysql-collation-for-portugese

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