According to the documentations, the @StringLength function has to be equivalent to the StringLengthCalculator transformer. i.e. it should return the number of characters in the given string.
StringLength(str) Returns the length of the input string. Equivalent transformer: StringLengthCalculator
StringLengthCalculator Usage Notes Note that in non-ASCII character sets, the length is the number of actual characters (some or all of which could be multi-byte) in the string, which may not match the number of bytes used to store the string.
However, the function could return wrong number if the given string contains muti-byte characters.
For example, if the given string was '???' with UTF-8 encoding, the number of characters should be 3 and the StringLengthCalculater returns 3 correctly, but the @StringLength function returns 6 on Windows. It seems to return the number of bytes, but the correct number of bytes is 9 for the string with UTF-8. That is, 6 is not either number of characters or number of bytes.
I think the implementation of the function should be fixed so that it exactly complies with the documentations, i.e. always returns the number of characters as well as the StringLengthCalculator.