How do you check if a one-character String is a letter - including any letters with accents?
I had to work this out recently, so I'll answer it myself, after the recent VB6 question reminded me.
解决方案
Just checking if a letter is in A-Z because that doesn't include letters with accents or letters in other alphabets.
I found out that you can use the regular expression class for 'Unicode letter', or one of its case-sensitive variations:
string.matches("\\p{L}"); // Unicode letter
string.matches("\\p{Lu}"); // Unicode upper-case letter
You can also do this with Character class:
Character.isLetter(character);
but that is less convenient if you need to check more than one letter.