Back to Geneos FAQ

How to compare Unicode characters in gateway rules

Caveat Copied

The Active Console is unable to display data in Unicode characters outside of specific ASCII code range. This can more likely affect certain languages like Chinese, Japanese and Korean (CJK characters). Users may encounter other unexpected issues since this has not gone through our official development and testing processes.

Users should check out the Geneos Compatibility Matrix with the following note:

Supported characters
All Geneos components only support ASCII characters 32-126.
Extended ASCII characters are not supported.

Workaround Copied

Users can consider to use regMatch() function in the gateway rule engine that supports syntax in regular expressions.

In this example we are using the Chinese characters “命令” which means “command” in English. First, we will save the Unicode pattern in a text file on a Linux server.

4405534445981 mceclip0

Then we will use the “hexdump” command on Linux to convert the text in hex code. You can see that the command output shows a total of 7 bytes. The reason is that each Unicode character is stored as 3 bytes, so the 2 characters will take up 6 bytes, plus the line feed character “0a” for the end of line.

4405558096285 mceclip1

In the gateway rule, the regMatch() function should add \x as prefix for each character. So the hexdump command output e5 91 bd e4 bb a4 will become:​

\\xe5\\x91\\xbd\\xe4\\xbb\\xa4

4405550021789 mceclip2

Below is the Active Console screenshot when the gateway rule matched the keyword, which may not be quite readable. Therefore it is desirable to have some English characters or error codes in the monitored patterns.

4405534551837 mceclip3

Further Reading Copied

["Geneos"] ["Geneos > Gateway"] ["FAQ"]

Was this topic helpful?