0

Some of mysql code I have been looking using utf8_slovenian_ci in it, why is that?
Is it because Slovenia needs this encoding to assimilate certain letters in their alphabet?

If I"m using english I can omit this can't I?
Or can I use utf8 or does it do it automatically?

CREATE TABLE `users` (
  `Id` int(11) NOT NULL AUTO_INCREMENT,
  `FirstName` varchar(255) COLLATE utf8_slovenian_ci DEFAULT NULL,
  `LastName` varchar(255) COLLATE utf8_slovenian_ci DEFAULT NULL,
  `Address` varchar(255) COLLATE utf8_slovenian_ci DEFAULT NULL,
  `PostCode` int(8) DEFAULT NULL,
  `PostName` varchar(255) COLLATE utf8_slovenian_ci DEFAULT NULL,
  `UserName` varchar(40) COLLATE utf8_slovenian_ci DEFAULT NULL,
  `PassWord` varchar(255) COLLATE utf8_slovenian_ci DEFAULT NULL,
  `EMail` varchar(255) COLLATE utf8_slovenian_ci DEFAULT NULL,
  `Phone1` varchar(255) COLLATE utf8_slovenian_ci DEFAULT NULL,
  `Phone2` varchar(255) COLLATE utf8_slovenian_ci DEFAULT NULL,
  `Ticket` varchar(255) COLLATE utf8_slovenian_ci DEFAULT NULL,
  `Verification` int(11) DEFAULT '1',
  `RecordStatus` tinyint(1) DEFAULT '1',
  PRIMARY KEY (`Id`)
) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 COLLATE=utf8_slovenian_ci;
ajreal
  • 46,720
  • 11
  • 89
  • 119
Solidariti
  • 475
  • 1
  • 6
  • 16

2 Answers2

3

Is it because Slovenia needs this encoding to assimilate certain letters in their alphabet?

Probably not because UTF-8 already covers all imaginable characters. The collation probably contains sorting and comparison rules specific to Slovenia. (See here for an overview what a collation does and how sorting rules can vary.)

If I"m using english I can omit this can't I?

you should be able to use one of the _general collations if you don't need any country specific rules.

Community
  • 1
  • 1
Pekka
  • 442,112
  • 142
  • 972
  • 1,088
1

Yes, you can omit this, although would to use utf8, because it can store any type of character and not just english. The specific language collations are used for sorting. I wouldn't recommend using slovenian (or any other language version), unless you have a very specific reason to do so. I think it's best to use utf_unicode_ci.

GolezTrol
  • 114,394
  • 18
  • 182
  • 210