LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Use Unicode character set in Labview

Hi I'm an italian boy an I would read from a Unicode file a string. I
tried using the "Read Line From File" but it didn't work. Only with the
"Read File" I can read the file but I don't know how display the
Unicode characters. In particular I would display russian characters in
a string indicator. How can I proceed?
Thanks in advance
ale

P.S.: sorry for my poor english...

0 Kudos
Message 1 of 7
(7,827 Views)


@Anonymous wrote:
Hi I'm an italian boy an I would read from a Unicode file a string. I
tried using the "Read Line From File" but it didn't work. Only with the
"Read File" I can read the file but I don't know how display the
Unicode characters. In particular I would display russian characters in
a string indicator. How can I proceed?
Thanks in advance
ale

P.S.: sorry for my poor english...



You have several problems here. First Read Line from File is specific to read ASCII files. It won't work on binary files which Unicode files are for LabVIEW.

Displaying is another issue. LabVIEW is inherently ASCII with some Multibyte character support for foreign language installations. Multibyte is something entirely different than Unicode although it has the same inentions but in very different ways.
So you won't be able to display Unicode text in LabVIEW directly. You can call the WideCharToMultiByte Windows API function to convert your Widechar Unicode array into a Multibyte string and provided you have set the right font for the specific control you "might" be able to see your Russion text.

I've posted a VI library that interfaces to the WideChar Windows API functions already in http://forums.ni.com/ni/board/message?board.id=170&message.id=123821&requireLogin=False so you can directly try with that.

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 2 of 7
(7,819 Views)
From NI Germany staff I got the information that there is an undocumented ini setting for LV. You must have Windows with Unicode support and Unicode fonts (e. g. XP).Then you must insert the line "UseUnicode=TRUE" in the LabVIEW.ini file. This way your characters should be diplayed correctly in controls and inidcators. I don't know if you can read and write Unicode files correctly this way. This information was for LV 7.1.1 but I think it should also work with LV 8.0.
Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
Message 3 of 7
(7,808 Views)

Hello,

    I need the complete character set file for English for my project. Is it possible for me to get from national Instruments?
0 Kudos
Message 4 of 7
(6,133 Views)

The Unicode support that is available in LabVIEW in this way is not a feature of LabVIEW but of the underlaying OS. So you should ask Microsoft for that.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 5 of 7
(6,126 Views)

Hi,

  Where can i find a demo on how to bulid an OCR using labview?

0 Kudos
Message 6 of 7
(6,103 Views)

This is totally unrelated to the original topic of this thread. Start a new thread!

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 7 of 7
(6,099 Views)