LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

create unicode file and read unicode file

Hi
 
    How can create a unicode file and open unicode file in LV
 
Regards
Madhu
0 Kudos
Message 1 of 5
(3,549 Views)

here and here

Hope it helps! Smiley Happy

Mathan

0 Kudos
Message 2 of 5
(3,544 Views)
At LAVA there is some pure LabVIEW code.

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
Message 3 of 5
(3,542 Views)


@gmadhu wrote:
Hi
 
    How can create a unicode file and open unicode file in LV
 
Regards
Madhu


In principle you can't. LabVIEW does not support Unicode (yet)! When it will officially support that is a question that I can't answer since I don't know it and as far as I know NI doesn't want to answer.

So the real question you have to ask first is where and why do you want to read and write Unicode file. And what type of Unicode? Unicode is definitly not just Unicode as Windows has a different notion of Unicode (16 Bit characters) than Unix has (32 Bit characters). The 16 Bit Unicode from Windows is able to cover most languages on this globe but definitly not all without code expansion techniques.

If you want to do this on Windows and have decided that there is no other way to do what you want you will probably have to access the WideCharToMultiByte() and MultibyteToWideChar() Windows APIs using the Call Library Node in order to convert between 8 bit multybyte strings as used in LabVIEW and the Unicode format necessary in your file.

Rolf Kalbermatter
Rolf Kalbermatter
My Blog
Message 4 of 5
(3,542 Views)


@TonP wrote:
At LAVA there is some pure LabVIEW code.

Ton


This code will only work if all the Unicode characters are in the standard ASCII 7 bit character set. This is only true for English text and possibly a few other European languages. Most other languages use special characters in their alphabet somehow, not to talk about eastern languages such as Chinese/Japanese or Arabic with a completely different character set.


If one knows one is dealing with Englisch text only it would be better to not use Unicode at all but just store it as ASCII text instead 🙂

Rolf Kalbermatter
Rolf Kalbermatter
My Blog
Message 5 of 5
(3,535 Views)