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. Jesper Öqvist

    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>>

  4. Log in to comment