LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Caption.Text in a Chinese or Vietnamese

Solved!
Go to solution

1) In labview diagram, if Unit=US, then Txt="Faulty Trigger Detection Threshold", if Unit=VN, then Txt ="Ngưỡng phát hiện lỗi đầu đo"
2) Assigned Txt to the "Caption.Text" Node Property
3) Font is set to Arial Unicode MS
4) Control Panel > Region > Language > Windows display language = Tiếng Việt (I have 2 languages packs installed: English and Tiếng Việt) When I run my Labview, if Unit = US, the Caption reads "Faulty Trigger Detection Threshold", however, if Unit = VN, the Caption reads weird incognizable characters.

Running Windows 11 and Labview 32 bit 21.0.1
I looked at this link: https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000YIFDCA4&l=en-US but that is for previous Windows version, Windows 11 language setting has much less options.

please help

0 Kudos
Message 1 of 3
(96 Views)

ngthai_0-1732640288055.png

I do have these 2 lines in Labview.ini:
UseUnicode=TRUE
SuperSecretPrivateSpecialStuff=TRUE

ngthai_1-1732640412351.png

My main interest is changing the Caption (not the string value, but I update string value here as well just to show you all my problem):
If TXT1 is set to Vietnamese, then the String Value shows correctly, but not the caption. However, when set to English, the string value is supposed to reads "Faulty Trigger ..." but it is displaying weird characters.

For TXT2, if I set Vietnamese, both the Value and the Caption read wrong. Supposed to be "Ngưỡng phát hiện lỗi đầu đo"




0 Kudos
Message 2 of 3
(47 Views)
Solution
Accepted by topic author ngthai

The property "Force Unicode Text" only affects keyboard entry,

Displayed text is affected by the text property "Interpret as Unicode".  This property is like font attributes in that it can be different for different characters in the string.  When writing to that property it only affects the selected text.

Executing the following one time will set the caption to always interpret data as UTF-16 LE.

paul_a_cardinale_0-1732647787576.png

Message 3 of 3
(27 Views)