Looks like this is a bug in the new script editor (not sure if it exists in the old one) but there are certain unicode characters that don't show up, and can cause errors in compilation:
I know that VSCode has a fix in place for these invisible characters that highlights them, but thought it might be worth noting incase others had the same issue. I actually got this hidden character from copying out of the javadocs in this page.
Looks like this is a bug in the new script editor (not sure if it exists in the old one) but there are certain unicode characters that don't show up
To be fair, that's a zero width space, so it shouldn't show up. But we can definitely get it out of the docs for future versions.
If this winds up being a problem with other copy/pasted text, it might be worth a post at ideas.inductiveautomation.com to see if we can highlight those.
On the plus side, it looks like Java 17 will remove those zero width joiners: [JDK-8266779] Use <wbr> instead of ZERO_WIDTH_SPACE - Java Bug System
In the interim, yeah, an ideas post would be good to gauge how useful this would be. There aren't that many non-displayable characters you can possibly enter in a Swing text area, so hopefully it's not that common.
Oh, nice, I'll close our ticket then. We're moving to Java 17 as soon as we can anyways.