From 11:00 PM CDT Friday, Nov 8 - 2:30 PM CDT Saturday, Nov 9, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

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
(3,280 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 LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 2
(3,268 Views)