4 ms·
> The designers of Java wanted to support arbitrary Unicode characters in source code -- not just in string literals, but in identifiers as well That's bad! I
by jackewiehose 8y ago
> The designers of Java wanted to support arbitrary Unicode characters in source code -- not just in string literals, but in identifiers as well
That's bad! I recently noticed "my" C++ compiler allows you to write
something like int mäin(){}. I didn't try it out but I guess it breaks
with different file encodings.
Please stay with ASCII!
- userbinator 8y agoDue to how they were written, a lot of compilers don't really care about character encoding in the sense that any bytes >127 were simply considered identifier characters because their tokenisers picked out the special characters and "anything else" would be classified with the usual identifier range. This meant you could use whatever single or multibyte encodings you wanted, as long as any trailing bytes of a single character didn't conflict with the special characters; with this, UTF-8 naturally works too.