0

In my language there is both uppercase I and İ (yes I with . on it). I want the result to be English.

I used the toUpperCase(); method, but it converts i to İ instead I.

It's ridiculous - there has to be some way to make the toUpperCase(); method properly convert in English.

timss
  • 9,982
  • 4
  • 34
  • 56
  • 3
    I think you need to change your locale. Check this question and the answers: http://stackoverflow.com/questions/11063102/using-locales-with-javas-tolowercase-and-touppercase – CPerkins Jan 13 '16 at 15:50
  • Ohh thank you very much sir. I found the answer to my question there. – kemal gülamber Jan 13 '16 at 15:54

1 Answers1

1

Use the overload of toUpperCase which accepts a Locale argument:

str.toUpperCase(Locale.ENGLISH);

Coincidentally, that method's Javadoc uses the Turkish İ as an example.

Andy Turner
  • 137,514
  • 11
  • 162
  • 243