问题
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