unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Zefram <zefram@fysh.org>
To: 22910@debbugs.gnu.org
Subject: bug#22910: read-only setlocale has side effect
Date: Fri, 4 Mar 2016 19:55:00 +0000	[thread overview]
Message-ID: <20160304195500.GA14310@fysh.org> (raw)
In-Reply-To: <20160304164859.GE7946@fysh.org>

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





  reply	other threads:[~2016-03-04 19:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-04 16:48 bug#22910: read-only setlocale has side effect Zefram
2016-03-04 19:55 ` Zefram [this message]
2016-08-07 21:58 ` Andy Wingo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160304195500.GA14310@fysh.org \
    --to=zefram@fysh.org \
    --cc=22910@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).