I am writing a program in java that works with Postgresql. Records in database have different languages, such as English, french and Spanish. While using searching I'm getting nullPointerException when a program comes to converting of the record from database (customer name) toLowerCase(). My problem is that I don't know the language of processed record, because characters looks similar.
Question: are there alternatives for toLowerCase() that compares characters without specifying a locale, just by comparing character by character and if one is different that another one, it returns false. Simply if Chinese character is different than the English one, return false.
Something like a = a returns true, but a = 诶 returns false, without giving me nullPointException.