LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading unicode text file

Thanks Paul! Got the file openned perfectly.

Matthew: can't seem to get your suggested setup to work. I'm using "Read Binary File.vi" with a 1D array of U16 as data type, but keep getting error 116 (Unflatten or byte stream read operation failed due to corrupt, unexpected, or truncated data). Then, "Convert UTF16 String to ASCII.vi" throws error 12 (Some system capacity necessary for operation is not enabled).
0 Kudos
Message 11 of 17
(3,624 Views)
Sorry Matthew, I was using the wrong inputs for Read Binary File -- got your suggested method to work as well.

Thanks again!
-Bayen
0 Kudos
Message 12 of 17
(3,621 Views)


@Matthew Kelton wrote:
I don't know where I got this, but found it when I needed to do some Unicode conversion from the registry.


It's from a post here on this forum from me where I posted that library.

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 13 of 17
(3,442 Views)

Thanks PJS, This helps me a lot!!!

0 Kudos
Message 14 of 17
(3,171 Views)

Hi Bayen,

 

Could you please share me the same snip or the VI which you said it got working.

I tried but ended up in empty results..

 

Thanks in Advance.

 

 

0 Kudos
Message 15 of 17
(1,610 Views)

I did a thing.

Does not support complex Emoji or other 4 byte characters.

Requires the Unicode toolkit from VIPM (get here).

________________________________________________________________________
"When I need the side of a building to view all the code..." -Mark Yedinak
"...when you need a navigation window to view the navigation window..." -Jeff Bohrer
Download All
0 Kudos
Message 16 of 17
(1,493 Views)

Inside my (still incomplete) Unicode project (attached), there are the functions:

  • Read From ASCII or UTF Text File - Output Code Points.vi
  • Read From ASCII or UTF Text File - Output UTF-16 LE.vi
  • Read From ASCII or UTF Text File - Output Unicode.vi

They will read:

  • ASCII
  • UTF-8
  • UTF-16 BE
  • UTF-16 LE
  • UTF-32 BE
  • UTF-32 LE
"If you weren't supposed to push it, it wouldn't be a button."
Message 17 of 17
(1,480 Views)