1.

Solve : Remove what i think are invisible or printer character from txt file?

Answer»

I'm having a hard time capturing the data using a vb script b/c of these characters i noticed in notepad++. This is causing my data to not line up correctly and causing me to capture incorrect data for my sub strings.

Is there a way i can remove them beforehand in vbs or batch and have my data line up correctly?

some of the characters look like so....

ð
NUL (in black a background)
SI  (in black a background)



[attachment deleted by admin to conserve space]Have you used a hex viewer before?

They allow you to see the exact pairs of hex digits and determine which characters are causing you a problem.
I seen Hex Viewers but never actually used one.Do you have any recommendation on one?On old versions of MS-DOS there was a file called DEBUG that would show the contents of a file in HEX format. But I don't think it is a 32 BIT program. So you will WANT to find an editor the is compliant with new versions of Windows.
Look here:
HTTP://sourceforge.net/projects/hexplorer/
Hexplorer. Binary (hexadecimal) editor for Windows
Quote

x86 disassembler
Import and export to 20 different formats of binary files, including Intel Hex, Motorola S-Record, Atmel standard etc.
Ability to find repeating patterns in data
Pixel viewer to visualise binaries as bitmaps
Filter text from binary data
...

Quote from: daillest319 on November 12, 2014, 08:37:05 AM
I'm having a hard time capturing the data using a vb script b/c of these characters i noticed in notepad++. This is causing my data to not line up correctly and causing me to capture incorrect data for my sub strings.

Is there a way i can remove them beforehand in vbs or batch and have my data line up correctly?
You can replace them with nothing, effectively removing them from the string

Code: [Select]LineResult = Replace(LineResult,Chr(0),"") 'Null character
LineResult = Replace(LineResult,Chr(240),"") 'greek character (Delta?)
LineResult = Replace(LineResult,Chr(145),"") 'backtick thing
LineResult = Replace(LineResult,Chr(15),"")   'Shift In Character

I would first eliminate other sources of the characters such as how you are retrieving the data.Thank you all for your help.


Discussion

No Comment Found