Skip to content

Adapter Handling of UTF8/Japanese Text #12

Description

@ryan-jeffrey

Per this comment it seems the issue with Japanese text might be in this adapter.

I see there are many references to ASCIIEncoding in MTCAdapter.cs. If I run the adapter as is with the japanese test text the agent will display this message in the XML stream:

<Fault dataItemId="systemCondition" timestamp="2026-01-07T23:26:19.8203954Z" sequence="80" nativeCode="1111" type="SYSTEM">????????????</Fault>.

If I change all the ASCIIEncodings to UTF8Encodings I get the following output:

<Fault dataItemId="systemCondition" timestamp="2026-01-07T23:16:17.1481955Z" sequence="80" nativeCode="1111" type="SYSTEM">&#xFF7D;&#xFF84;&#xFF9B;&#xFF70;&#xFF78;&#xFF74;&#xFF9D;&#xFF84;&#xFF9E;&#x8EF8;&#x3042;&#x308A;</Fault>

The text is formatted in HTML escape sequences but they are the correct values. I'm unsure why changing the ASCIIEncoings to UTF8Encodings isn't enough.

The whole line I send from the adapter to the agent is "2026-01-07T22:32:50.8567651Z|systemCondition|FAULT|1111|||ストロークエンド軸あり".

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions