I have a form where the user inputs Chinese/Japanese characters and then I compare it with a declared value. The problem is even if the input and the declared value are the same it is not equal.
A hard-coded variable such as variableA = "官话"
is not equal to the form input text. When it is printed, it displays "官话"
.
Even their lengths aren't equal! new String("官话").length();
is not equal to
formInputtedCharacter.length();
, where the input when printed is "官话" (UTF-8 already)
How could this be?