What's so great about latin1_swedish_ci

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

What's so great about latin1_swedish_ci

Post by Ambush Commander »

I tried googling for it but alas, to no avail. CI = case insensitive, so that makes sense, but why Swedish Latin?
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post by onion2k »

Never worked that out myself. But having such a weird default is a good reminder to change it, so I'm not complaining.
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Post by Ambush Commander »

So you "should" change it?
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

Re: What's so great about latin1_swedish_ci

Post by Roja »

Ambush Commander wrote:I tried googling for it but alas, to no avail. CI = case insensitive, so that makes sense, but why Swedish Latin?
Where do you see latin1_swedish_ci ?
pilau
Forum Regular
Posts: 594
Joined: Sat Jul 09, 2005 10:22 am
Location: Israel

Post by pilau »

Collation column on a string key row in a DB table.
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

Post by Roja »

pilau wrote:Collation column on a string key row in a DB table.
Odd.. I guess Fedora, Redhat, and OpenBSD fix that before packaging, as I've never encountered it.
pilau
Forum Regular
Posts: 594
Joined: Sat Jul 09, 2005 10:22 am
Location: Israel

Post by pilau »

Roja wrote:Fedora, Redhat, and OpenBSD fix that before packaging
What are these?
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

Post by Roja »

pilau wrote:
Roja wrote:Fedora, Redhat, and OpenBSD fix that before packaging
What are these?
Operating systems that I use, which have packages for mysql.
pilau
Forum Regular
Posts: 594
Joined: Sat Jul 09, 2005 10:22 am
Location: Israel

Post by pilau »

Ok. Is there anything special about them?
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post by onion2k »

I think it's only the default on the Windows binary of MySQL. Maybe that's compiled by a Swedish person.

As for changing it, I always set my databases to utf8_unicode_ci .. but most of the sites I write have some internationalised elements these days. Strictly speaking you should set the collation and charset to whatever language your content is going to be.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

pilau wrote:Ok. Is there anything special about them?
They're all linux based systems ;)
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

Post by Roja »

d11wtq wrote:
pilau wrote:Ok. Is there anything special about them?
They're all linux based systems ;)
Not OpenBSD! :)
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

Post by Roja »

pilau wrote:Ok. Is there anything special about them?
I only mentioned them because no one had mentioned on what platform they were seeing this oddball setting, and I had never experienced it. On the platforms I had used (OpenBSD, Redhat, Fedora), that setting isn't used.

I was trying to help clarify where the problem was, essentially.
pilau
Forum Regular
Posts: 594
Joined: Sat Jul 09, 2005 10:22 am
Location: Israel

Post by pilau »

I'm having the same thing but with MySQL 3.2, each time I create a new CHAR or VARCHAR or TEXT key it sets it's collation as 'latin1_swedish_ci'.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Of course, unless your system's package manager is changing the settings you most likely get the default collation as latin1_swedish_ci ;)

Last install of MySQL 4 on Gentoo and SuSE both gave me this default ;)
Post Reply