LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Text property: Interpret As Unicode

Have you had trouble getting the "Interpret As Unicode" property to work consistently?  It always seemed buggy to me, but this morning I discovered that its not a bug, it's a feature (really!).  It turns out that it's like font properties in that it applies to selected text; if no text is selected, changing "Interpret As Unicode" has no effect.  To send new text in a particular format, do this:

ut.png

 

To change the format of all existing text, do this:

et.png

"If you weren't supposed to push it, it wouldn't be a button."
Message 1 of 10
(2,975 Views)

You didn't know this tool?

LabVIEW Unicode Programming Tools 

 

 

 

George Zou
0 Kudos
Message 2 of 10
(2,935 Views)
0 Kudos
Message 3 of 10
(2,872 Views)

paul, why is that one  property node in your snippet  yellow and the other two are brown?

 

I can't figure out how to use your snippet directly, so I tried to reproduce using the property nodes from the NI unicode tools:

unicode-strings.png

 

 

0 Kudos
Message 4 of 10
(2,861 Views)

@alexderjuengere wrote:

paul, why is that one  property node in your snippet  yellow and the other two are brown?


The brown nodes are for internal NI use only (super secret scripting).

 

There's also blue (scripting) and red (obsolete) nodes.

Message 5 of 10
(2,851 Views)
@alexderjuengere wrote:

paul, why is that one  property node in your snippet  yellow and the other two are brown?

 

I can't figure out how to use your snippet directly, so I tried to reproduce using the property nodes from the NI unicode tools:

The node is brown because the property "Interpret As Unicode" is designated private.  Ordinarily I try to avoid using private properties, but since NI uses this one in an addon toolkit, I feel OK about it.

The "Interpret As Unicode" is definitely changeable back to False.  Note however that setting the "Force Unicode Input" property to True changes "Interpret As Unicode" to True.  When "Force Unicode Input" is true, when you're typing text into the string, it converts it to Unicode.

 

To use my snippet with a string control, get the Text reference from a string property node.

"If you weren't supposed to push it, it wouldn't be a button."
Message 6 of 10
(2,820 Views)

@paul_cardinale wrote:

The "Interpret As Unicode" is definitely changeable back to False. 


yes, I made a copy and paste error in my snippet's comment ....

I want to write "you can go back to the previous state" 😐

 

interpret.png

 

 


@paul_cardinale wrote:

  Note however that setting the "Force Unicode Input" property to True changes "Interpret As Unicode" to True.  When "Force Unicode Input" is true, when you're typing text into the string, it converts it to Unicode.

thanks!

 

 

 

 

0 Kudos
Message 7 of 10
(2,802 Views)

@paul_cardinale wrote:

  Note however that setting the "Force Unicode Input" property to True changes "Interpret As Unicode" to True.

hm ... 🤔

 

force snippet2.png

0 Kudos
Message 8 of 10
(2,788 Views)

Where can I get a Text's "Interpret As Unicode" property node, i.e. not String's "Text.Interpret As Unicode"? I have not found one in ni_lib_unicode-2.0.1.6.vip or LV_Unicode-115-lv2009 (no password).zip

0 Kudos
Message 9 of 10
(1,184 Views)

Here

"If you weren't supposed to push it, it wouldn't be a button."
Message 10 of 10
(1,177 Views)