LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

characters y and b appear when reading a text file

Solved!
Go to solution

The vi shown in the picture opens a text file from hard drive with "Open/Create/Replace File" and with "Read from Spreadsheet File".

Then the vi displays the text in the respective indicators. 

 

In both indicators, there is a y and b that appear as the very first first characters.

It's not exactly a y and b. The y has two dots over it and the stem of the b hangs low, a non-English script. 

 

In Word and Notepad these charcters don't show up. The first character is a zero as I originally wrote. 

The text file was originally created in Excel and then saved as unicode text. 

 

From whence do these funky letters come? and how do I get them to leave? 

 

Also, it looks like the text in both indicators is adding a blank line after each line. That doesn't show up Notepad or Word either. 

 

 

0 Kudos
Message 1 of 3
(2,785 Views)
Solution
Accepted by topic author Carmen92126

@Carmen92126 wrote:

The text file was originally created in Excel and then saved as unicode text.


There's your problem: unicode.  You might want to check out this quick thread: Config file "byte order mark"

 

Yes, by saving as Unicode, you have a couple of extra bytes that most text editor know to ignore.  But LabVIEW just gives you the raw data.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 3
(2,771 Views)

Saving the original as "Text (Tab Delimited)" solved the problem. 

 

Thank you. 

0 Kudos
Message 3 of 3
(2,742 Views)