On Mon, May 19, 2014 at 3:16 PM, Alain O'Dea <alain.odea@gmail.com> wrote:
On a whim I tried setting LC_ALL to en_US.UTF-8 and the problem
disappeared.  Does hGetLine have undefined behavior if locale
environment variables (LANG, LC_*) are unset?

This makes me wonder if it's actually throwing an encoding error which somehow gets overwritten or mis-recorded (similar to the C newcomer's mistake in trusting errno when an error was not indicated).

--
brandon s allbery kf8nh                               sine nomine associates
allbery.b@gmail.com                                  ballbery@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net