LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

UTF-8 to Text primitive

Is this primitive exposed somewhere in the palette?

 

I found it was used by a VI in the NI Unicode Tools

 

TiTou_0-1749105306363.png

 

 

 


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 1 of 5
(604 Views)

Off pallet, but it's been widely used for a long time.

Message 2 of 5
(601 Views)

@drjdpowell I'm having issues with the primitive.


On Linux it behaves differently whether it runs as code source or in a built shared library.

 

In source code, no problem.

In built shared library, the primitive return error 1396 "cannot convert text from the source character set to the destination character set."

The small tweek below fixed the issue for me. 

 

TiTou_0-1750171159557.png

I'm not entirely sure how the "system default" is handled, but it wouldn't be the only primitive that misbehaves when running as a service on Linux.
https://forums.ni.com/t5/LabVIEW/Application-Directory-primitive-bug/m-p/4364464#M1282065


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 3 of 5
(493 Views)

locale text encoding is a tricky topic. Generally most Linux installations nowadays use UTF-8 as default locale encoding, at least in the user session. This means that that node does effectively nothing since the locale specific encoding is the same as the UTF-8 side of things.

 

In a console session, or a hidden session, however this could be very different depending on how the system is setup. Try to execute "locale" as a command line command in your LabVIEW editor session (user session) and inside your shared library invoked from a service!

 

https://www.baeldung.com/linux/terminal-locales-check-character-encoding

 

Of course it is entirely possible that the according code is not available in a runtime compiled shared library, or maybe the according encoding translation libraries used (likely iconv) is not available in the service session context. 

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 4 of 5
(481 Views)

thank you for the advice, i'll try that


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 5 of 5
(460 Views)