Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When Unicode characters are included, the encoding is broken #3

Open
myyrakle opened this issue Jul 27, 2020 · 1 comment
Open

When Unicode characters are included, the encoding is broken #3

myyrakle opened this issue Jul 27, 2020 · 1 comment

Comments

@myyrakle
Copy link

The bigger problem is that not only is the encoding broken, but the structure of the output json is also destroyed!
If you enter Korean characters or Chinese characters, etc., the content may be broken or json's double quotes may disappear.
image

The environment was windows 10, and the encoding of the source file was utf8.

The encoding format of the output file was utf16. Perhaps unifying the encoding format with utf8 could solve it.
Can you solve this problem?

@lmammino
Copy link
Owner

Hello @myyrakle, thanks for submitting this issue. Would you like to contribute to the project by fixing this with a PR?

One option could be to make the encoding configurable through a dedicated CLI argument.

The main challenge would be that we should update one of the dependencies projects (https://github.com/Surnet/swagger-jsdoc) to support this use case first (https://github.com/Surnet/swagger-jsdoc/blob/b95d73456b22165a3df867b590f61bc2b889a20d/lib/helpers/parseApiFile.js#L11).

I opened issue Surnet/swagger-jsdoc#206 as a starting point

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

No branches or pull requests

2 participants