-
Notifications
You must be signed in to change notification settings - Fork 803
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
Character code errors in multi-byte character environments #148
Comments
@n-etupirka thanks for reporting this. I'll take a look and see what I need to do to resolve the problem. |
@n-etupirka Can you share what the output of
|
It looks like I'm able to send Japanese characters back and forth without problem
|
@Ne0nd0g The result of
This may be accomplished by setting not only the primary language to Japanese, but also the system locale to Japanese. |
@Ne0nd0g The ls command, which is built into Merlin, did not cause the error. (The second image is Agent's debug log.) However, when I run dir from a shell command, I get an error. This is the correct output of the dir command at the endpoint.
|
I just wanted to follow up and say that I'm able to duplicate the problem and I'm working on a fix. |
OK, I have a fix now. It's brittle, but it works. I check to make sure the output is UTF-8. If it isn't, I check the active code page. In this case, the code page is The fix for handling ShiftJS is in the https://github.com/Ne0nd0g/merlin-agent repository. I still need to fix the fact that the gRPC stream broke and did not fix itself. |
@n-etupirka Are you comfortable building the Merlin Agent from source code using the |
@Ne0nd0g I have confirmed that everything is working as expected in the Japanese environment! Incidentally, are there any plans to fix the bug that breaks gRPC streams in languages other than UTF-8 and ShiftJIS? |
Yes, I do plan to fix the bug that broke gRPC. There are two different problems. One is that the gRPC stream received non UTF-8 text. On the Agent, I now detect non UTF-8 and convert it to UTF-8. The second is that the gRPC stream didn't recover. I'll work on that next. |
I'm going to use this issue to fix the gRPC error too. |
Updated merlin-cli to try and recover broken gRPC message stream identified in this issue Ne0nd0g/merlin-cli@e4ef7b9 |
I tried it in the following version, and confirmed that even in a non UTF-8 environment, no errors occurred and it was replaced with "�".
|
Awesome, thank you for trying it out. I added support for simplified and traditional Chinese as well as Korean in this commit if you want to try that out as well Ne0nd0g/merlin-agent@4c60e45 |
In Japan, multi-byte characters are used.
If the output of a command executed by the shell command contains multi-byte characters, an error will result.
Prerequisite
Environment Data
Expected Behavior
The output of the command is displayed on the server.
Actual Behavior
An error is displayed.
Steps to Reproduce Behavior
Misc Information
The text was updated successfully, but these errors were encountered: