05-03-2018 10:57 PM
Hi,
I want to read/write data in .csv files using labVIEW 2017 but face some problems now.
To show the Japanese characters correctly, I have set “UseUnicode=True” in the LabVIEW.ini file. When I used write/read spread sheet vi to write/read data for .csv file, it worked and showed correct data on labVIEW. But when I open the .csv file by Excel or Microsoft Notepad, it showed garbage. For example, original data = "ご機嫌はいかがですか" and .csv will show "T0_j屇o0D0K0L0g0Y0K0".
Due to that I may have to edit data in .CSV files (by Excel or Microsoft Notepad), I am wondering how to show the correct data not only on labVIEW. Please find my sample code and .csv file as attachment. Thanks.
Ian
05-03-2018 11:11 PM
Are you choosing Save As Unicode when you save the text file in Notepad?
LabVIEW has never handled unicode character sets that well. And I don't believe Notepad does a very good job either.
The best thing to do is avoid using unicode characters in either place.
05-04-2018 08:46 AM
The Test.csv file has no Byte-Order-Marker (BOM). It the first 2 bytes should be FFFE.
It may be that the Read & Write Spreadsheet functions don't support Unicode (you'll have to do some experimenting). You may have to write your own versions of those files.