LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error recognizing numbers in text file encoded UCS-2-LE-BOM

Solved!
Go to solution

Capture.JPG

 I am trying to convert a peak area and height read in from a GC file (.csv) from string into a number.  The only way Labview will read in the file is as a string, I have tried many other read options.  I have tried a number of ways to attack this, but in the end it appears that the file encoding (UCS-2-LE-BOM) is to blame and creates spaces between numbers that Labview does not recognize.  I have tried a program to remove the spaces, they are not seen.  If I externally convert with notepad ++ the file to ANSI, everything works fine.  This isn't practical for my application.  Any thoughts on a workaround that I haven't tried?

Download All
0 Kudos
Message 1 of 2
(1,575 Views)
Solution
Accepted by topic author holmch11

Hi holmch,

 

the quick&dirty workaround:

check.png

 


@holmch11 wrote:

the file encoding (UCS-2-LE-BOM) is to blame and creates spaces between numbers that Labview does not recognize.  I have tried a program to remove the spaces, they are not seen.


There are no spaces between the chars, these are bytes containing the value 00h…

Best regards,
GerdW


using LV2020 on Win8.1+cRIO
Message 2 of 2
(1,563 Views)