LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Text property: Interpret As Unicode

Highlighted

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 8
(259 Views)
0 Kudos
Message 2 of 8
(219 Views)

+1 for NXG...

0 Kudos
Message 3 of 8
(156 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 8
(145 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 8
(135 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 8
(104 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 8
(86 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 8
(72 Views)