From: Bruce Korb <bkorb@gnu.org>
To: Elias Pipping <pipping@lavabit.com>, bug-guile@gnu.org
Cc: bug-autogen@gnu.org
Subject: Re: [Bug-autogen] test failure with guile-2.0.2
Date: Mon, 11 Jul 2011 06:28:18 -0700 [thread overview]
Message-ID: <4E1AFA72.2050803__17116.0745354884$1310409483$gmane$org@gnu.org> (raw)
In-Reply-To: <20110710.001131.2114114687665811411.pipping@lavabit.com>
Hi Elias, et al.,
On 07/09/11 15:11, Elias Pipping wrote:
> with autogen 5.12 and guile [top of tree] I get a test failure that
> I do not get with the same version of autogen and guile 2.0.2.
>
> The failing test is string.test.
>
> It fails because instead of ending with \001\002\003\377 as expected,
> a generated string ends with \001\002\003?. I'm attaching the relevant
> output. Here's a snippet passed through `od -c`:
>
> 0002060 h a s s l e " . 001 002 003 377 \r \n '<
> 0002260 h a s s l e " . 001 002 003 ? \r \n '<
>
> where the first line is expected and the second line is what's
> actually returned.
>
> I'm also attaching a script that reproduces the problem and can be run
> from inside a checkout of the guile git repository. It builds guile,
> installs it to a temporary location, then builds autogen 5.12 and
> makes it use that version of guile; In conjunction with git-bisect,
> this revealed that the following commit is to blame:
>
> commit 95f5e303bc7f6174255b12fd1113d69364863762
> Author: Andy Wingo<wingo@pobox.com>
> Date: Thu Mar 17 18:29:08 2011 +0100
>
> scm_{to,from}_locale_string use current locale, not current ports
>
> * libguile/strings.c (scm_to_locale_stringn, scm_from_locale_stringn):
> Use the encoding of the current locale, not of the current i/o ports.
> Also use the current conversion strategy.
>
> * doc/ref/api-data.texi (Conversion to/from C): Update docs.
>
> See also [1].
The intent is that I have several functions: raw-shell-str, shell-str,
c-string and kr-string each of which produces precisely the same byte
sequence as their argument for the intended target environment.
The first two produce text that, when processed by the shell and passed
through as arguments to a program, will be seen by the program as
identical to the original string handed off to the guile function.
Similarly, c-string and kr-string will produce C variable initialization
text that, after compilation, the compiled program will see the exact
same sequence of bytes given to guile to hand off to the function I wrote.
If this is no longer the case, then guile has changed its interface again.
PLEASE DO NOT DO THAT. If you think you made a mistake with the interface
I was told to use, please change the interface name and deprecate the
old one rather than cut me off at the knees. Thank you. Then I can
transition to another interface. But please tell me which one.
I just want byte arrays. I don't want Guile sticking its nose in and
"improving" the sequence of bytes for me (deleting DEL characters, for
example).
Thank you. Regards, Bruce
next parent reply other threads:[~2011-07-11 13:28 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20110710.001131.2114114687665811411.pipping@lavabit.com>
2011-07-11 13:28 ` Bruce Korb [this message]
[not found] ` <20110711.160906.808950167011716776.pipping@lavabit.com>
2011-07-11 17:32 ` [Bug-autogen] test failure with guile-2.0.2 Bruce Korb
[not found] ` <4E1AFA72.2050803@gnu.org>
2011-07-13 8:48 ` Andy Wingo
2011-07-13 12:54 ` Bruce Korb
[not found] ` <4E1D95A0.60504@gnu.org>
2011-07-13 13:41 ` Andy Wingo
2011-07-13 15:01 ` Thien-Thi Nguyen
2011-07-15 16:25 ` Thien-Thi Nguyen
2011-07-18 9:30 ` Andy Wingo
2011-07-13 15:11 ` Bruce Korb
[not found] ` <4E1DB59B.9070700@gnu.org>
2011-07-14 9:01 ` Andy Wingo
2011-07-17 20:47 ` ‘scm_from_locale_string’ and locale character encoding Ludovic Courtès
2011-07-18 16:18 ` Bruce Korb
[not found] ` <4E245CC5.4040505@gnu.org>
2011-07-19 9:35 ` Ludovic Courtès
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='4E1AFA72.2050803__17116.0745354884$1310409483$gmane$org@gnu.org' \
--to=bkorb@gnu.org \
--cc=bug-autogen@gnu.org \
--cc=bug-guile@gnu.org \
--cc=pipping@lavabit.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).