09-27-2012 10:25 AM - edited 09-27-2012 10:27 AM
I am able to write Unicode (UT-16) characters in a PDF document (PDF report) with LabVIEW, but this is laborious. I try to find an easiest way.
I don’t want to enable the Unicode support with "UseUnicode=True" in the LabVIEW.ini (because too many weird things happen).
Here are the steps:
1) If I want to use Unicode, I write the text in Notepad, and I save with the encoding Unicode.
2) I have a VI who read this text file, remove the BOM (xFFFE) and write the rest of the content in a string.
3) I copy this string in a string of the PDF Report.
4) I do the conversion, of the string, to an array of U16.
5) I generate an Unicode string with the .net constructor “mscorlib(2.0.0.0).system.string”
6) I write this Unicode string in the PDF Report.
It works well (see the attachment), but the steps 1 to 3 are laborious. I try to find another way, but I have no idea.
09-28-2012 05:58 PM
Here are a couple of good articles about Unicode in LabVIEW that are worth reading:
https://decibel.ni.com/content/docs/DOC-10153
http://ae.natinst.com/public.nsf/web/searchinternal/5dc82d7cd67a373f8625741100737926?OpenDocument
http://ae.natinst.com/public.nsf/web/searchinternal/628ec79dccc4485b8625724b0061ca5e?OpenDocument
10-01-2012 08:45 PM
Andrew,
Your links that begin with ae.natinst.com are not visible to anyone outside of NI.
10-02-2012 10:59 AM
Sorry about that. After taking a closer look, they cover parts of the same content as that first article. It is a very good resource on the subject.
10-02-2012 11:14 AM
Thanks for those links HandyAndy.
I already read the “A List of Tips and Tools for using Unicode in LabVIEW” a couple of times. Like I said, I want to simplify those steps (without activated the Unicode support with "UseUnicode=True" in the LabVIEW.ini):
1) I write the text in Notepad, and I save with the encoding Unicode.
2) I have a VI who read this text file, remove the BOM (xFFFE) and write the rest of the content in a string.
3) I copy this string in a string of the PDF Report.
Maybe it is impossible or maybe someone have an idea.