Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> Can someone explain why this fixes the problem.
Think about a machine where char is signed by default. Extracting \254
into an int will produce -2, which will not equal \254 returned by getc.
regards, tom lane