From: Andy Wingo <wingo@pobox.com>
To: Mike Gran <spk121@yahoo.com>
Cc: guile-devel <guile-devel@gnu.org>
Subject: Re: scm_{to,from}_locale_string
Date: Thu, 17 Mar 2011 23:12:11 +0100 [thread overview]
Message-ID: <m3bp19z9ac.fsf@unquote.localdomain> (raw)
In-Reply-To: <453544.78973.qm@web37901.mail.mud.yahoo.com> (Mike Gran's message of "Thu, 17 Mar 2011 11:38:12 -0700 (PDT)")
Evening,
On Thu 17 Mar 2011 19:38, Mike Gran <spk121@yahoo.com> writes:
> So, if have a CGI script where the stdout could have one
> a couple of different encodings based on a web client's language
> preference settings, but, where the CGI program is running in a "C"
> or "en_US.utf8" locale, this might count.
The thing is that we need to be giving the C library strings encoded in
the current locale, not the locale of any particular port, because
that's how library functions will decode the strings internally -- take
the regexec case, for example, recently fixed.
I think that if the CGI script wants to read or write in a particular
locale, either you set the LC_ALL/LC_CTYPE vars, do a setlocale in the
Guile script, or set the encoding on a port. But that's port encodings,
not something related to scm_{to/from}_locale_string, I don't think...
Of course, in the CGI context, the encoding of any _environment
variables_ is another thorny question, but not one that should depend on
port encodings.
Regards,
Andy
--
http://wingolog.org/
next prev parent reply other threads:[~2011-03-17 22:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-17 18:38 scm_{to,from}_locale_string Mike Gran
2011-03-17 22:12 ` Andy Wingo [this message]
2011-03-18 11:53 ` scm_{to,from}_locale_string Ludovic Courtès
-- strict thread matches above, loose matches on Subject: below --
2011-03-17 16:49 scm_{to,from}_locale_string 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=m3bp19z9ac.fsf@unquote.localdomain \
--to=wingo@pobox.com \
--cc=guile-devel@gnu.org \
--cc=spk121@yahoo.com \
/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).