Is it an error to call hGetLine on a non-blocking Handle?

Brandon Allbery allbery.b at
Mon May 19 19:40:09 UTC 2014

On Mon, May 19, 2014 at 3:16 PM, Alain O'Dea <alain.odea at> 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 at                                  ballbery at
unix, openafs, kerberos, infrastructure, xmonad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Libraries mailing list