LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Entering Unicode characters to table

Hi all,

I am trying to solve rather specific issue regarding entering Unicode characters into table instead of ASCII. First of all, I read https://forums.ni.com/t5/Reference-Design-Content/LabVIEW-Unicode-Programming-Tools/ta-p/3493021, which deals with putting Unicode chars into table programatically and I managed to apply it. Hovewer, when I want to enter Unicode characters manually into table, I encounter issue: when I start typing into table cell, if I start with character outside of ASCII, whole string is represented as Unicode and each character I put inside is prepresented by 4 hexa digits. Hovewer, if I start with ASCII characters, they are represented by only 2 hexa digits, until I put character which is outside ASCII, from which point, given character is represented with 4 digits in hexa representation. This creates issue, because it makes the entire representation shift and ultimately messes whole string. I could solve it programatically after the whole string is typed, but what I need, hovewer, is that entire string I put into table cell is represented as Unicode by default, regardless of whether first characters are ASCII or not, so that while typing, user can see what he really types. Any help would be appreciated.

 

For better explanation, I am adding specific examples of typing into table:

 

When typing string "qwe" into table cell, hexa representation of entered text is "7177 65".

When typing string "šqwe" into table cell, hexa representation of entered text is "6101 7100 7700 6500". This is correct representation.

When typing string "qšwe" into table cell, hexa representation of entered text is "7161 0177 0065 0000" This is incorrect representation and as you can see, it was shifted by 2 digits to the left.

When typing string "qwše" into table cell, hexa representation of entered text is "7100 6101 6500 7700". Again incorrect representation, shifted by 4 digits to the left.

When typing string "qweš" into table cell, hexa representation of entered text is "7100 7761 0100 6500". Also incorrect, not shifted by 6 digits as I would expect from the previous pattern, but acting randomly at first glance.

 

0 Kudos
Message 1 of 2
(2,927 Views)

If you can use a string array instead of a table, you can set the string elements to always be unicode (see attachment).  I couldn't find a way to do it with a table.  You could probably create unicode table XControl.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 2 of 2
(2,902 Views)