LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using Unicodes in File path control

Solved!
Go to solution

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 meCapture.PNG

Message 1 of 8
(1,420 Views)

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!


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 8
(1,408 Views)

Yes we can, but the file will be saved in chineese format only, I have read same as it

0 Kudos
Message 3 of 8
(1,389 Views)

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. 


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 8
(1,364 Views)
Solution
Accepted by topic author Arun124$

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.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 5 of 8
(1,354 Views)
Solution
Accepted by topic author Arun124$

@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.

0 Kudos
Message 6 of 8
(1,334 Views)

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.

0 Kudos
Message 7 of 8
(1,285 Views)

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 

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 8 of 8
(1,258 Views)