07-30-2014 08:42 AM
Hi, I have some issue to write a file in Unicode (UTF-16)
I have to read a file with LabView, change some parameters and write the new data into the same file. The file uses Unicode UTF-16.
I downloaded some library here: https://decibel.ni.com/content/docs/DOC-10153
I can read the file, convert the data to UNI/ASCII/UNI, and then write the file. But when I open the new file with an editor like Notepad++ there are some unexpected characters at the end of the line.
Even reading the file and writing exactly the same data doesn'not work.
I attached an example.
Thanks for you kind support.
Solved! Go to Solution.
07-30-2014 12:36 PM
Any idea?
07-30-2014 12:44 PM
Right-click on your Read and Write Text File functions. There is an option to "Convert End Of Line". Turn that off on both functions.
As a side not, you don't need the Close File functions. The Read and Write Text File functions will close the file if the file reference output is not wired.
07-30-2014 12:44 PM - edited 07-30-2014 12:45 PM
No chance to look at any of your code but problems like this are almost always, and by almost always I mean always caused by using Write to Text File with the default option of Convert EOL selected.
Assuming this is true (I am 99.9% sure that it is), simply right-click the function and deselect the Convert EOL option.
Edit (seeing the above post make that 100.0% sure)
07-30-2014 12:49 PM
It was really stupid.
I was searching the EOL everywhere and it was under the right-click butto!
Thanks