Why the hell is Java decoding/unescaping source code? It literally makes no sense. It doesn't even do it properly. Putting in \z gets me an error because it doesn't exist. Putting \z in a comment works fine. If it's going to decode my source code why the hell isn't it giving me errors on invalid decodes. Java is not doing the wrong thing correctly
It's defined but makes no sense. It's also doing it wrong. //\z isn't a correct escape so it should get an error. If you say it shouldn't then //\u0ashouldn't either because it's also an invalid escape however it does.
I'm calling bullshit. 1) Noone reads or writes \u1234 themselves 2) I can't imagine the compiler throwing a fit that 8bit characters are in the source file in a comment (ANSI is 8bit IIRC do this pushes my point) so only the IDE would care what encoding the file is
3
u/[deleted] May 11 '18
Why the hell is Java decoding/unescaping source code? It literally makes no sense. It doesn't even do it properly. Putting in \z gets me an error because it doesn't exist. Putting \z in a comment works fine. If it's going to decode my source code why the hell isn't it giving me errors on invalid decodes. Java is not doing the wrong thing correctly