1 Reply Latest reply on Jul 12, 2018 6:51 AM by Eugene Lee

    Can I use UTF-8 encoded characters in digital state set strings?

    Clyde.Reimann

      What types of characters are allowed in the state strings of digital state sets?

      I tried defining a several new Digital State Sets in a PI Server by importing a CSV file with the new states.  One of the new Digital State Sets has UTF-8 encoded Chinese characters for the state values.  This was just a test to see if I can define them, so state values are just random characters that require 4 bytes to define.  First, I created a file with this in it.

      \xEF\xBB\xBFDigital State Set, Digital States...

      dig_set_0990,UNDEFINED-0, Normal,Alarm,UNDEFINED-3

      dig_set_0991,UNDEFINED-0,Alarm,Normal,UNDEFINED-3

      dig_set_1000,<<Chinese characters>>

      On the first line, the 3 characters "\xEF\xBB\xBF" are the UTF-8 Byte Order Mark (BOM) indicator.  These characters are not visible in Notepad.

      On the last line, after the "<<Chinese characters>>" was 8 characters with a blanks between characters as shown in this pattern:1 2,3 4,5 6,7 8

      In the PI System Management Tools window, I go to Points -> Digital States and select the "Import set(s) and state(s) from a file" icon, which opens a pop-up window "Import Digital Set(s)", in that I select the file with the above information in it.  This is then shown in that pop-up window.

      PI_DigSet_with_Chinese_chars.PNG

      I then select "Create Set(s)" button which imports the new state sets, and then "Close" button.  This is then shown in the PI System Management Tools window.

      Note that all of the State Name values are "?? ??"

      PI_DigSet_with_Chinese_chars_after_import.PNG

       

      Does PI even allow Chinese characters to be stored as State Name values in Digital State sets?

      If it is allowed, then why are the characters shown as question marks instead of the actual Chinese characters?
      And how can I get the Chinese characters to be shown?