UNICODE_TRANS.put('÷', "/");
There are two characters in that literal, so it's not a character literal. What was meant was:
UNICODE_TRANS.put('÷', "/");
So what has probably happened is that the source code is saved as UTF-8, but is being interpreted by the compiler (and your text editor) as Windows code page 1252.
To fix the compiler for normal javac
you use the flag -encoding UTF-8
. The way you specify that for different IDEs and build systems will vary.
It is unfortunate that Java does not have in-file signalling for encoding. You can avoid the problem by ensuring source is pure ASCII, and including non-ASCII characters via escape:
UNICODE_TRANS.put('\u00F7', "/");