03-14-2021 06:21 AM
hi, am trying to read a CSV file and the name of the file is saved in a Chinese language. i cant read the file using a file path control.
kindly help me
Solved! Go to Solution.
03-14-2021 06:36 AM - edited 03-14-2021 06:43 AM
Rename the file
EDIT: It seems like a shame. Arun went to the effort of actually posting a clear message. And, all I could offer was 3 words and a Kudos. So, I had to edit my response with the virtual attaboy for a well formed post. Thanks!
03-14-2021 07:15 AM
Yes we can, but the file will be saved in chineese format only, I have read same as it
03-14-2021 11:34 AM
Unfortunately, LabVIEW has very limited support for unicode. And it requires a modification of the LabVIEW.ini file
Of course, the year, month and day could be specified as the iso 8601 yyyymmdd format and the idiograms representing year month and day could easily be avoided.
03-14-2021 01:13 PM
Internally, LabVIEW stores a path as a set of strings, one string per path element. Each character is stored as one byte, and the maximum length of each element is 255 bytes.
03-15-2021 05:01 AM
@paul_cardinale wrote:
Internally, LabVIEW stores a path as a set of strings, one string per path element. Each character is stored as one byte, and the maximum length of each element is 255 bytes.
260 IIRC.
03-16-2021 03:34 AM
It depends on the formatting of the data file.
The data probably has some sort of unicode encoding. There are a lot of them. UTF-8 BE, UTF=8 LE are common. Use Notepad++ to check, or to change the encoding.
That unicode encoding needs to be translated to LabVIEW's encoding. Either MBSC, or unicode when the control's text has been configured to use unicode. The conversion to MBSC needs a code page (the code page used for legacy non-unicode applications), but there are Windows APIs that can be used.
So, there are a few open questions...
How is the file encoded?
How is the control\indicator configured?
The data in your indicator actually shows data. But we can't see the code. Please explain what you expect. Note that we (I) don't understand Chinese, so for you it might be clear that the data is bogus, for us it's not.
03-16-2021 10:17 AM
wiebe@CARYA wrote:
It depends on the formatting of the data file.
The data probably has some sort of unicode encoding. There are a lot of them. UTF-8 BE, UTF=8 LE are common. Use Notepad++ to check, or to change the encoding.
That unicode encoding needs to be translated to LabVIEW's encoding. Either MBSC, or unicode when the control's text has been configured to use unicode. The conversion to MBSC needs a code page (the code page used for legacy non-unicode applications), but there are Windows APIs that can be used.
So, there are a few open questions...
How is the file encoded?
How is the control\indicator configured?
The data in your indicator actually shows data. But we can't see the code. Please explain what you expect. Note that we (I) don't understand Chinese, so for you it might be clear that the data is bogus, for us it's not.
If you're referring to content of text files, inside my very-incomplete Unicode system are some functions for reading and decoding text files. See https://forums.ni.com/t5/LabVIEW/UI-Multi-language-with-Unicode/m-p/4113825#M1186408