LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

undocumented function "text to utf-8"

Solved!
Go to solution

@Hooovahh wrote:


I'm not too familiar with these text formats, but can one convert the string 1024 bytes at a time?  And then concatenate the result?


ASCII to UTF-8 is not a problem except when you use a codepage that has multibyte characters. Then you can't just cut the ASCII string at will as you migh cut a mutibyte character in two and the resulting lead byte won't translate into a valid UTF-8 byte sequence and neiter will the trail byte(s) in the second buffer. Unfortunately there is not standard encoding as different codepages use different encoding schemes so you can't just check for certain bytes in the string to know if it is a lead byte or one or more trail bytes of a MBC byte sequence.

 

UTF-8 to ASCII you have to watch out to only cut the string before the lead character which can either be < 0x80 or 0xC0 to 0xFF. Bytes with value 0x80 to 0xBF are so called trail bytes and can never be the fist byte in an UTF-8 sequence.

Rolf Kalbermatter
My Blog
0 Kudos
Message 21 of 24
(2,344 Views)

Does anybody have any idea how to show multibyte characters like Chinese in a RT-Target? I managed to show these characters in LV on my Windows development system, but not on the RT Target. 

0 Kudos
Message 22 of 24
(2,152 Views)

thankyou for your VI links ,i am looking  for it now!

0 Kudos
Message 23 of 24
(1,871 Views)

There is no multilingual Support on Embedded UI in LV RT. Therefore, to use the embedded UI, ensure that both your host computer and RT target use the English versions of the Real-Time Module.

 

http://zone.ni.com/reference/en-XX/help/370715P-01/lvrtconcepts/display_developing/

0 Kudos
Message 24 of 24
(1,815 Views)