Unicode escapes in generated comments

Issue #297 resolved
Oskar Berg
created an issue

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)

  1. Jesper Öqvist

    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.

  2. Jesper Öqvist

    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.

  3. Log in to comment