-
-
Notifications
You must be signed in to change notification settings - Fork 76
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
Cannot show Chinese correctly #150
Comments
Same Issue here, using windows 11 |
This appears to be a problem with the encoding assumptions made when reading from the libgit2 library. That library is simply an array of characters. It could be encoded as anything, but probably is encoded as UTF-8. What it is NOT encoded as a 32 bit unicode encoding, which is what godot::String holds internally. The constructor used assumes that it is the char array is 8 bits which is then converted to a 32 bit internal storage (see String::copy_from() in core/string/ustring.cpp). A reasonable fix is to assume all data from libgit2 is UTF8. This should handle almost everyone, For those that have to have their data stored in another encoding, there would need to be an "encoding" parameter probably at the VCS data level (at the same place the user/password/ssh key are recorded. I believe that an enhancement should be created for including an "encoding" parameter, and that the current plugin should be updated to assume UTF-8. I'll create a pull request with the defaulting to UTF-8, but please discuss if this doesn't seem like a good solution. |
I think default to UTF-8 willl be good. On the other hand, |
See #218 (comment) for a possible solution. |
…ealing with data from the git repository
I closed the out of date pull request and created a new one |
The text was updated successfully, but these errors were encountered: