Skip to content

Conversation

@dtlnor
Copy link

@dtlnor dtlnor commented Sep 25, 2022

  • windows can't read utf-8 json properly without explicit define the encoding format

- windows can't read utf-8 json properly without explicit define the encoding format
@siikamiika
Copy link
Owner

Thank you for the contribution! I don't have a Windows machine to test right now, but you might also be able to fix this by setting the code page to 65001 (utf-8) before running the tool. I'm just lazy to set it explicitly because usually my systems are UTF-8 by default. Anyway, explicit encoding is the correct way to do it.

There are also some other uses of open in the code that are not in binary mode (wb/rb) and lack an explicit encoding. Maybe it's good to change those as well while at it.

By the way, I haven't used this for some time, so you can feel free to start maintaining your own fork of the contents of the ./danmaku/ directory and I'll link to it in this repo. I release it to the public domain but you can mention the origin if you want to.

https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/chcp
https://learn.microsoft.com/en-us/windows/win32/intl/code-page-identifiers

@dtlnor
Copy link
Author

dtlnor commented Nov 4, 2022

Sorry for the late reply, I have added explicit encoding for those not in binary mode.
Glad to know you are welcome to link my clone, but since I am not going to maintain this actively (like I forgot to check the update of this pr about a month), I think I will just keep focusing on your repo.

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

Successfully merging this pull request may close these issues.

2 participants