LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read/Write Japanese characters from .CSV file showing wrong data

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

Download All
0 Kudos
Message 1 of 3
(2,961 Views)

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.

0 Kudos
Message 2 of 3
(2,957 Views)

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.

 

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 3 of 3
(2,923 Views)