LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read a txt without separating data by space.

Hi, 

I am reading a txt from my PC and save it on a string. Perfect.

The problem becomes when I realize that all the caracters are separated by a space.

Do you know how to import the data without spaces? 

I attach my vi.(Descargar archivo desde CEIA) and the txt.file(ControllerGateway)

Captura.PNG

As you can see on the following picture, a space appears between each caracter. the txt file does not have this spaces.

 


Captura.PNG

 

Thanks in advance.

Download All
0 Kudos
Message 1 of 3
(2,525 Views)

Hi plaza,

 

Do you know how to import the data without spaces?

Did you notice the first two chars in your "text" file?

They have a special meaning: they signalize the file encoding!

 

Your text is encoded as "UCS2 LE BOM" (according to Notepad++), which means Unicode, 16bit per char, LittleEndian ByteOrderMark.

LabVIEW only uses old ASCII standard and so reads the upper byte as "space" char (infact it's a zero byte!).

 

Easiest would be to save the text as ASCII (or plain UTF-8) using any text editor you like to. (I recommend Notepad++.)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 3
(2,519 Views)

Your html file is saved in Unicode, you'll either have to resave it or handle it.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 3 of 3
(2,516 Views)