Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is a String Culture

Just trying to understand that - I have never used it before. How is a culture different to ToUpper() / ToLower()??

like image 620
Jack Kada Avatar asked Mar 24 '10 14:03

Jack Kada


3 Answers

As SLaks says, different cultures handle casing differently.

A specific example from MSDN:

In most Latin alphabets, the character i (Unicode 0069) is the lowercase version of the character I (Unicode 0049). However, the Turkish alphabet has two versions of the character I: one with a dot and one without a dot. In Turkish, the character I (Unicode 0049) is considered the uppercase version of a different character ı (Unicode 0131).

like image 72
Rob Elliott Avatar answered Nov 12 '22 02:11

Rob Elliott


Different cultures have different rules for converting between uppercase and lowercase characters.

They also have different rules for comparing and sorting strings, and for converting numbers and dates to strings.

like image 36
SLaks Avatar answered Nov 12 '22 03:11

SLaks


The Turkish I is the most common example of cultural differences in case mappings, but there are many others.

I recommend checking out the Unicode Consortium's information on this.

http://www.unicode.org/faq/casemap_charprop.html

like image 1
Jeffrey L Whitledge Avatar answered Nov 12 '22 02:11

Jeffrey L Whitledge