Unicode escapes in generated comments
When I changed the project name to something which began with a u i came upon a wierd error. The code does not compile anymore and it complains about invalid unicode escape character.
I googled the problem and apperntly you are not allowed to write "\u" anywhere in java code, not even comments.
Why \u is not allowed https://stackoverflow.com/questions/31739245/why-does-this-code-showing-error-invalid-unicode?lq=1
Comments (4)
-
-
Account Deactivated I'd suggest always generating the comments using forward slashes in the paths.
-
There was already a function for escaping filenames, however it did not handle unintentional Unicode escapes. I fixed this. It's a bit hard to test since we don't have a Windows Jenkins instance, but it works as it should in an artifical test case.
-
- changed status to resolved
Improved filename escaping for doc comments
This escapes unintentional Unicode escape sequences in filenames (on Windows, for directories starting with 'u').
fixes
#297(bitbucket)→ <<cset 3fbb6a799ebb>>
- Log in to comment
It looks like JastAdd needs to filter all such unintentional Unicode escape sequences. I don't see any viable workaround for this issue, other than moving the project to another directory. There is no option to disable those comments from being generated.