Skip to content
This repository has been archived by the owner on Dec 19, 2023. It is now read-only.

Strange unicode issue in JavaDoc for parameters #349

Closed
michael-browne opened this issue Aug 16, 2019 · 3 comments · Fixed by #354
Closed

Strange unicode issue in JavaDoc for parameters #349

michael-browne opened this issue Aug 16, 2019 · 3 comments · Fixed by #354

Comments

@michael-browne
Copy link

In the JavaDoc for a controller the text descriptions for the parameters are encoded in the \\uxxxxx format.

Here's a sample from the json:

"comment":"テスト","parameters":{"from":"\\u30c6\\u30b9\\u30c8"}

and the original JavaDoc:

/**
 * テスト
 * @param from テスト
 * @return テスト
 */

As you can see the comment is encoded correctly, just the parameters descriptions are affected.

The final HTML files ends up looking like this:

Screenshot 2019-08-16 at 11 52 42

Does anyone know what is causing this?
Thanks

@fbenz
Copy link
Contributor

fbenz commented Aug 16, 2019

Which Java version are you using? The Doclet API changed with Java 9 and we thus have two different implementations.

For Java 8, we are not doing any transformation and I just ran the test with the characters and it works:

...
  "methods": {
    "initiate": {
      "comment": "Initiates request テスト",
      "parameters": {
        "force": "true if force",
        "when": "when to initiate テスト"
      },
...

@michael-browne
Copy link
Author

I'm using Java 11. Do I need to do something different?

@michael-browne
Copy link
Author

Sorry for the late reply, but I just checked this again and I can confirm I'm using the JDK 9+ JSON Doclet with Java 11.

Both 2.0.5 and 2.0.6 produce the same results.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants