From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

undocumented function "text to utf-8"

Solved!
Go to solution
Hello everybody
 
In the VI "SMTP Send Email Send Message.vi" I found a function named "text to utf-8". (See attached Image.) There is a short description in the context help, but no documentation in the help. I can not find the function in the VI palette. How can I add it there? Is there a counterpart to translate Unicode to (LabVIEW) text? This would be verry useful.
 
Greetings
shb
 
0 Kudos
Message 1 of 24
(42,904 Views)
Hello shb,

I've search for this VI. But I can't find it too.
You cannot add it there because it is a SubVI from the "SMTP Send Email Send Message.vi"
You can find the
SMTP Send Email Send Message.vi in blockdigramm rightklick-> Data commication->Protocols->Mail. If you want to choose this SubVI text to utf-8, you have to doubleclick on the VI, then the SubVI behind popup and then you can see the  "text to utf-8.vi". If you find that VI, you could seperate it and add it in your user Libary.  If you have a LV 8.0 or higher you could add the VI: go to  Tools-> Anvanced->Edit Palette Set. That go to the Top an rightklick->insert->VI and add the seperated VI.
If You have an older LabVIEW please see this KB:
http://digital.ni.com/public.nsf/websearch/271E4F55D1BC728286256903006AE627?OpenDocument
There is no further
documentation to this VI. I cannot find any counterpart to the VI. But you can convert the UTF-8 code to ASCII an that can be read by LabVIEW.

Best Regards
Arsala
0 Kudos
Message 2 of 24
(42,830 Views)
Solution
Accepted by topic author shb

More than two years have passed. Now I found the counterpart named "UTF-8 to Text" (by using VI-Scripting).

If anybody else wants to convert text to or from UTF8, the two functions are in the appended VI (saved for LabVIEW 8.0).

 

Greetings,

shb

Message 3 of 24
(42,420 Views)
Thank you very much! I am writing  a kml file for Google Earth. It accepts UTF-8. Text to UTF-8 really works perfect!
0 Kudos
Message 4 of 24
(42,227 Views)

Thank You!

 

I was having an issue with an XML parser not seeing all of the nodes...   Boiled down to a UTF-8 conversion error, which this VI took care of.   

0 Kudos
Message 5 of 24
(42,092 Views)

You're a genius!

 

I already spent some time on writing a simple UTF-8 encoder in LV (Didn't want to use the ugly win32 API via Call Library). It's obsolete now and I'm happy about that Smiley Very Happy

 

These primitives should definitely be added to the standard palette.

Please suggest that on the LV idea exchange, I'd give a kudos to you instantaneously Smiley Wink

 

0 Kudos
Message 6 of 24
(42,064 Views)
0 Kudos
Message 7 of 24
(41,989 Views)

These primitives are indeed very useful and would be an nice addition to the LV API, but we felt that they had been insufficiently tested on the various OS LabVIEW supports to add them to the product.

 

Also, these primitives assume your system locale to do the ANSI<->UTF-8 conversion. A while back, I had a need to be able to convert foreign text that was not in encoded in my computer locale to UTF-8. So, a colleague of mine helped me write the appropriate Windows API call in LabVIEW to do that.

 

Some people might find these VIs useful, but they only work on Windows and they provided as-is, without any guarantee that they are free of bug. Use at your own risks!

Message 8 of 24
(41,487 Views)

Well, "SMTP Send Email Send Message.vi" contains "text to utf-8" since several LabVIEW versions. The function "text to utf-8" should be quite stable.

0 Kudos
Message 9 of 24
(39,446 Views)

I used Text to UTF-8 in a VI, and it works very well, but the compiled .exe (created with application builder) of the same VI doesn't work. It runs, but results are wrong, and i think it's because of Text to UTF-8. Someone has any experience in compiling these functions?

0 Kudos
Message 10 of 24
(39,065 Views)