Remove non-readable characters from a string
Tue, 07/20/2021 - 06:18 am
I am loading a header of a tiff image. The header was successfully loaded as a string but it contains some non-readable characters.
Is it possible to remove these non-readable characters from the string?
String path // file path
Variable endline // terminal line for the header, line number starts from zero.
Open/R refNum as path
string header = ""
variable i = 0
FReadLine refNum, buffer //Read one line each until find the specified string
header += buffer
while(i<endline) // to avoid loading all lines. if your header is larger than 100 line, increase the number.