Showing results for 
Search instead for 
Did you mean: 

undocumented function "text to utf-8"

Go to solution
Hello everybody
In the VI "SMTP Send Email Send" 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.
0 Kudos
Message 1 of 22
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"
You can find the
SMTP Send Email Send 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". 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:
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
0 Kudos
Message 2 of 22
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).




Message 3 of 22
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 22

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 22

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 22
0 Kudos
Message 7 of 22

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 22

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

0 Kudos
Message 9 of 22

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 22