Not a bug. You're not using CHARIN correctly. Here's the docs for the third arg
length indicates the requested number of characters to read in. If 0, then CHARIN() merely sets the "read character position" to position without reading any characters and returns an empty string. (ie, Similiar to using STREAM's SEEK). If length is omitted, CHARIN() defaults to reading only 1 character.
So your line...temp = CHARIN(ansi_filein, 1) ... sets the position to 1 and then also reads the first char. Obviously, the next CHARIN will start at the second char (unless you supply another position). Try...temp = CHARIN(ansi_filein, 1, 0) |