GNU bug report logs - #22910
read-only setlocale has side effect

Previous Next

Package: guile;

Reported by: Zefram <zefram <at> fysh.org>

Date: Fri, 4 Mar 2016 16:50:01 UTC

Severity: normal

Full log


Message #8 received at 22910 <at> debbugs.gnu.org (full text, mbox):

From: Zefram <zefram <at> fysh.org>
To: 22910 <at> debbugs.gnu.org
Subject: Re: bug#22910: read-only setlocale has side effect
Date: Fri, 4 Mar 2016 19:55:00 +0000
Additional information: setlocale's side effect on primordial ports
happens even if the port's encoding has been individually set using
set-port-encoding!.  This means that to maintain a specific encoding on
these ports (other than the locale's nominal encoding, which is likely to
not be binary compatible) it is necessary to set the encoding repeatedly,
before any I/O operation after setlocale might have been called.
Since the read-only mode of setlocale has this effect, and arbitrary
library code might feel entitled to call setlocale for read purposes
without documenting that it does so, this really amounts to setting the
encoding before every I/O operation.

-zefram




This bug report was last modified 8 years and 312 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.