Click to See Complete Forum and Search --> : Upper/Lower case issue


laitinen
August 25th, 2008, 08:49 AM
Hi,

According to the ISO-standard land codes are typically written with upper case letters (NO,DK,FR,GB) while language codes are written with lower case(no,da,fr,en).

Would it be best to always use toUpper/Lower when using these values in an application or insert/query them with the correct upper/lower form?

What do you think?

davide++
August 25th, 2008, 12:23 PM
Hi all.

What do you mean with "language codes"? I don't understand.
Land codes are written in upper case, according international rules, so they should be stored into a database how they are, in upper case. You will avoid conversion statements between letter cases.

Alsvha
August 25th, 2008, 02:41 PM
Depending on the database you use, I'd say it doesn't matter.
The semantics of the language and country codes should not matter in most database-architecture purposes (in fact I can't think of any reason why it would matter), because if you need it, it is mostly for displaying purpose and then you can just format it for display.

So I'd say - don't bother with it. And if you must keep it in a specific case constantly - just keep it in the one you prefer. Myself I prefer to keep such things in an case-insensitive collation.