Skip to content
This repository has been archived by the owner on Aug 9, 2022. It is now read-only.

How did I use charset option like default doclet #62

Open
cary-hu opened this issue Apr 1, 2021 · 3 comments
Open

How did I use charset option like default doclet #62

cary-hu opened this issue Apr 1, 2021 · 3 comments

Comments

@cary-hu
Copy link

cary-hu commented Apr 1, 2021

I've tried to use docfx doclet generate java doc yaml file for docfx

but If my doc contains Chinese character, those character will be convert to Unicode like \u4e2d\u6587

ant when I try default doclet, there was a option called charset, when I set this options to UTF-8, the Chinese character rendered correctly.

some one has ideas for that ?

@cary-hu
Copy link
Author

cary-hu commented Apr 2, 2021

#63

@anmeng10101
Copy link
Collaborator

@cary-hu Thanks a lot for the feedback and awesome pr.

This doclet does not extend the standard doclet, but re-implement, thus the options for default doclet will not take effect.

As English is the language used for our projects' comment, so initially we just tested for English. Let me add a work item to track and handle this request.

@cary-hu
Copy link
Author

cary-hu commented Apr 2, 2021

Thank a lot.

Seems that docfx only supports UTF-8 encoded yml files right?

We've tested the following cases, non-ascii characters generated correctly with this fix

Test Case 1:

Java Source Code (GB2312)  ---> JavaDoc + docfx-doclet-with-my-patch ---> Yml (UTF-8) 

(When running JavaDoc, should with parameter: -encoding GB2312)

Test Case 2:

Java Source Code (UTF-8)  ---> JavaDoc + docfx-doclet-with-my-patch ---> Yml (UTF-8) 

(When running JavaDoc, should with parameter: -encoding UTF-8)

Feel free to me know if you need my help.

We are using this doclet in our business these weeks (commercial), so I will reply about this issue quick recently.

After these days (say 1month or 2month later), maybe I will give a delayed reply, sorry for my limited support.

Regards

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

No branches or pull requests

2 participants