-
Notifications
You must be signed in to change notification settings - Fork 20
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
Chinese garbled code #39
Comments
Hello @qaqRose, it doesn’t have to be like that. I believe that we can introduce/configure text encoding in library to avoid this issue. |
It boils down to this code I suppose: MangoAutomation/BACnet4J#55, note - it can be addressed above bacnet4j by post-re-processing |
Hello @splatch , Thank you for your reply. I have provided some Chinese test characters and Wireshark message files, which mainly contain the connection of bacnet client, the acquisition of devices and the acquisition of BacNetObject information. Tips: all the fields with garbled codes in Chinese are example:
|
Hello @splatch , It seems to be caused by not supporting MBCS. When I switched to UTF-8, I didn't have this problem. |
I've made basic test with byte representation of your text and it doesn't match. The device side encoding is probably wrong or not in line with UTF-8. At least for description of analog output 16 (packet 555 in your capture/screenshot). Wireshark input:
The output is not 1:1 with your input, but what worries me, and leads to assumption that device side might be wrong, is byte representation of string, at least its beginning: Other devices/objects in your dump look fine. It doesn't seem to be library issue, especially that text encoding declared by device is UTF-8. |
Yes, the coding on the device side is not UTF-8. I don't know why wireshare is displayed as UTF-8. This is the message that I set up the device side to use UTF-8.
and when i change the It is correct to print the text |
utf-8 |
I tried to get the description in deviceObject, but the output Chinese garbled code, how should I deal with its coding?
The text was updated successfully, but these errors were encountered: