Author Topic: Letters in UTF-16  (Read 12081 times)

kbldk

  • Newbie
  • Posts: 2
  • I'm a llama!
    • View Profile
Letters in UTF-16
« on: April 17, 2013, 01:20:15 AM »
Hi Forum,

I have a FDM88-10 which I am coding.

I have read that the unit is read letters in unicode UTF-16, and I am wondering how I can write different letters in the LCD display or the $ string varibles?

I need the unit to show Danish characters and cyrillic Russian characters which is supported by UTF-16.

Is there any syntax I can use for showing that I am stating a UTF-16 unicode instead of the actual letter?

This is an example of a Danish letter - http://www.fileformat.info/info/unicode/char/00c6/index.htm

Any help would be appriciated.

kbldk

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:Letters in UTF-16
« Reply #1 on: April 17, 2013, 07:26:27 AM »
The PLC doesn't use UTF-16 internally.

It is only the i-TRiLOGI software that is using the UTF-16 so that comments and menu can be displayed in international languages. The PLC doesn't really care what you use. So if you need to display something in UTF-16 you need to send two bytes to form a single Unicode characters and if your hardware support it then you can display it.

E.g. Some Chinese LCDs are able to accept data sent in to it as Unicode and display the characters accordingly and the PLC can then send the required codes and i-TRiLOGI does provide the translation utility for Chinese characters under the "Help" menu. For other languages there are online translator that let you input the international language characters and translate into the two-byte numbers that represent the character and you can then use them inside your program. Unfortunately you would not be able to view these characters using online monitoring.
« Last Edit: April 17, 2013, 07:27:13 AM by support »
Email: support@triplc.com
Tel: 1-877-TRI-PLCS