what are the corresponding unicode values of lower case and upper case letters from a to z
+9
A:
Same as ASCII (but with leading 0s :)
A-Z = U+0041 - U+005A = 65-90 decimal
a-z = U+0061 - U+007A = 97-122 decimal
Jon Skeet
2009-01-30 11:36:01
dammit, 13 seconds faster! ;)
jalf
2009-01-30 11:36:46
You cannot beat Jon Skeet ;)
Filip Ekberg
2009-01-30 12:02:25
Downvoters: reasons are welcome as always...
Jon Skeet
2009-01-30 12:32:10
The answer is not complete. The mapping between lower and upper case letters is language-specific. For instance, in Turkish the lower case i corresponds to the upper case İ (dotted I) and the "plain" upper case I corresponds to lower case ı (dotless i)
Nemanja Trifunovic
2009-01-30 19:06:22
@Nemanja: It depends on how you read the question, IMO.
Jon Skeet
2009-01-30 19:19:45
The OP only asked about the ASCII letters. This answer looks complete to me.
Alan Moore
2009-02-04 12:52:00
+1
A:
There are hex tables here: http://www.tamasoft.co.jp/en/general-info/unicode.html
But they are the same as ASCII anyway.
John
2009-01-30 11:39:03
+6
A:
The answer largely depends on your language. Answers here are good for English language, but some languages contain additional characters which sometimes even change to two characters depending on the case (or two to one inversely) - Turkish comes to mind.
Spikolynn
2009-01-30 11:41:21
While I agree with the general idea behind the answer - this does not really match the question, as neither umlaut characters nor "ß" are between a and z.
mghie
2009-01-30 11:53:22
"neither umlaut characters nor ß are between a and z" - maybe not in your alphabet. ;]
bzlm
2009-01-30 12:12:36
It definitely depends on how you read the question. I read it as "A-Z" and "a-z" rather than "a-z" and "upper-cased in a culturally sensitive manner a-z". I agree it's good to know about that though.
Jon Skeet
2009-01-30 12:14:53
@bzlm: No. There simply is no space left between U+0041 and U+005A or between U+0061 and U+007A for any umlaut characters. Regardless of alphabet. There was no mention in the question about language-correct sorting or anything like that.
mghie
2009-01-30 16:41:31
And if that was actually what was wanted, why did the OP ask for "unicode values of lower case and upper case letters from a to z" instead of "unicode values of lower case and upper case letters"?
mghie
2009-01-30 16:45:11
mghie: I don't know which Germany you come from but in my Duden, “ä” has the same lexicographical ordering as “a”. ;-) The question wasn't about U+0061–U+007A but rather about A–Z. I think awareness about these facts is very beneficial for programmers. Apart from that, you're obviously right.
Konrad Rudolph
2009-01-30 19:03:03
+1 for the answer. The mapping of lower case to upper case letters is language-specific and Turkish (i, I, ı) is a good example of that.
Nemanja Trifunovic
2009-01-30 19:09:11
@Konrad Rudolph: OK, but none of us is psychic. It'd be best if the question was edited by the OP. It would be easier to find it in searches later on, too. BTW, I suppose I come from the very same Germany as you, but one never knows ;-)
mghie
2009-01-31 10:18:41