11-26-2024 06:53 AM
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
Solved! Go to Solution.
11-26-2024 11:05 AM
I do have these 2 lines in Labview.ini:
UseUnicode=TRUE
SuperSecretPrivateSpecialStuff=TRUE
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"
11-26-2024 01:01 PM - edited 11-26-2024 01:04 PM
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.
11-29-2024 06:11 AM
Thank you Paul,
Solution works.
Now I have 2 new problems:
1) Caption 1 is actually in SETUP tab. Text 2 actually in FEATURE tab. When I change box 3 in Advance tab, the caption 1 and text 2 will be temporarily overlapping ugly like this. I had to click on any other tab, then come back to ADVANCE tab, then the overlapping would disappear.
2) Text 2 is not displaying the right Vietnamese (I do use InterpAsUnicode). I had to create a blank option on Box 3 to select (to blank out all the captions, and use same setting for InterpAsUnicode) then go back to Box 3 to Select Vietnam, in order for text 2 to display in the right Vietnamese language. Why?
on problem 1: if I don't switch to different tab, and keep changing to different options on box 3, then all the captions and texts will eventually overlapping like this:
11-29-2024 07:23 AM
@ngthai wrote:
Thank you Paul,
Solution works.
Now I have 2 new problems:
1) Caption 1 is actually in SETUP tab. Text 2 actually in FEATURE tab. When I change box 3 in Advance tab, the caption 1 and text 2 will be temporarily overlapping ugly like this. I had to click on any other tab, then come back to ADVANCE tab, then the overlapping would disappear.
2) Text 2 is not displaying the right Vietnamese (I do use InterpAsUnicode). I had to create a blank option on Box 3 to select (to blank out all the captions, and use same setting for InterpAsUnicode) then go back to Box 3 to Select Vietnam, in order for text 2 to display in the right Vietnamese language. Why?
on problem 1: if I don't switch to different tab, and keep changing to different options on box 3, then all the captions and texts will eventually overlapping like this:
I suspect that all your problems are due to InterpAsUnicode not begin applied to all the characters.
Doing this, one time, before sending any text to the caption, should have worked:
But another technique is to do this:
11-30-2024 04:11 AM - edited 11-30-2024 04:14 AM
Thank you. Problem #2 solved (using your suggestion to use Selection.End=9999).
However, problem #1 still exists (the captions keep appearing temporarily on the wrong tab) if I start the VI on "Page 2" tab. It appears if I start the VI on "Page 1" tab, then it's OK. Attached here is a simple VI.
11-30-2024 04:23 AM
So I conclude that this is Labview problem. Because if I remove InterpAsUnicode element out of the property node, then there is no overlapping text (showing up on wrong tab pages) problem (but of course, it will not show the correct unicode texts in certain languages).
Is there a way to solve this Labview "refresh" problem?