-
Notifications
You must be signed in to change notification settings - Fork 9
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
incompatible character encodings: UTF-8 and Windows-31J #2
Comments
Hmm, what OS are you running? And if you're running Windows, is your system codepage set to 932 (Japanese) by chance? |
Windows 10 (64-bit) and indeed language for non-Unicode programs is set to Japanese (which is required to run Japanese games in many cases). What was interesting with this encounter was that it came up with only one game from those i tested (i can recheck with different locale if you want). |
No thanks, I think I've figured it out. I was a bit sloppy and assumed that Ruby would be using UTF-8 for string literals, but it seems it uses the encoding of the source file, which makes sense. However, if you don't specify in the source file that it's encoded in UTF-8, it assumes the system codepage (which in your case was CP932) which it can't concatenate with the strings that it read from the files which it explicitly encoded to UTF-8. (It worked for me because my codepage is UTF-8.) I think I'm doing a poor job of explaining this, but I'm about to merge your pull request with my own code and that should hopefully be a bit clearer. |
I'm getting a very similar error, |
Encountered this problem with one game. I fixed it for myself by cobbling together an additional exception handling in patch_text.rb:254
The text was updated successfully, but these errors were encountered: