Does the language of a VARCHAR matter?

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
Josh1billion
Forum Contributor
Posts: 316
Joined: Tue Sep 11, 2007 3:25 pm

Does the language of a VARCHAR matter?

Post by Josh1billion »

I installed WAMP today to start work on a new project, then I installed PhpMyAdmin. It seems that the VARCHAR's are set via default to the language "latin1_swedish_ci". Is this fine (the Swedish language uses the same alphabet as I understand) or will I run into trouble in the future?

I'm 99% sure it's fine, but I just want to get a second opinion before I start some heavy work..
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Post by Christopher »

You will be fine until you want to store some extended chars. If you stick with ASCII then you are fine.
(#10850)
User avatar
Josh1billion
Forum Contributor
Posts: 316
Joined: Tue Sep 11, 2007 3:25 pm

Post by Josh1billion »

Alright, thanks for the information, I have now converted all VARCHAR fields to ascii_general_ci.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

You might be interested in http://dev.mysql.com/doc/refman/5.1/en/ ... html[quote] MySQL 5.1 Reference Manual :: 9 Character Set Support :: 9.1 Character Sets and Collations in General[/quote]
josa
Forum Commoner
Posts: 75
Joined: Mon Jun 24, 2002 4:58 am
Location: Sweden

Post by josa »

It is fine. latin1_swedish_ci is not the character set - it's the collation. The character set is latin1 by default. The collation latin1_swedish_ci is the default collation for all new MySQL installations which should explain why you have it in your database as well.

/josa
Post Reply