From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.bugs Subject: Re: [Bug-autogen] test failure with guile-2.0.2 Date: Wed, 13 Jul 2011 10:48:08 +0200 Message-ID: <871uxud0s7.fsf@pobox.com> References: <20110710.001131.2114114687665811411.pipping@lavabit.com> <4E1AFA72.2050803@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1310547253 22092 80.91.229.12 (13 Jul 2011 08:54:13 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 13 Jul 2011 08:54:13 +0000 (UTC) Cc: bug-guile@gnu.org, bug-autogen@gnu.org, Elias Pipping To: Bruce Korb Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Wed Jul 13 10:54:08 2011 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QgvCp-0002mo-Ra for guile-bugs@m.gmane.org; Wed, 13 Jul 2011 10:54:07 +0200 Original-Received: from localhost ([::1]:44461 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QgvCp-0003XZ-5s for guile-bugs@m.gmane.org; Wed, 13 Jul 2011 04:54:07 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:57774) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qgv7f-0002im-MY for bug-guile@gnu.org; Wed, 13 Jul 2011 04:48:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qgv7a-0004tF-G6 for bug-guile@gnu.org; Wed, 13 Jul 2011 04:48:46 -0400 Original-Received: from a-pb-sasl-sd.pobox.com ([64.74.157.62]:46636 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qgv79-0004hu-BW; Wed, 13 Jul 2011 04:48:15 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id BD8C93AC8; Wed, 13 Jul 2011 04:48:13 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=XWu5hAabQxLfb4oj06jhKsu74WU=; b=ktzRRn DdTzuHfUVgmuBFgte6H/ao7NzugY+09fY9zxzt+m/3zaJ3zHwIzaZhCIgLUCQ9xG MUuwckoh+X6RXUvS+RpnI59PjUhMxZNBg/omh7Kq2YirJoC+hiCWXWhRoBhGOkAZ z0D6hh5CSNYOoEJ/FJrvZj44IfHbW5IR0b3ew= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=eLEIG5PQ7HGZVWtwngK+iKDePLVvRW56 OS6WdZDnmAb1NhI4R9aCTRXqURj6KZPoNtmvRIHg2qfS/uT/aOA8wjq84vLD40K5 lz9hICVd0E5WTQoyOEX3oDVL5aMcpp0ZvYnx0wctmUy34rOIXNZJ7P+fSmJzhaEj 7FK4V6wsyE4= Original-Received: from a-pb-sasl-sd.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 9F3163AC7; Wed, 13 Jul 2011 04:48:13 -0400 (EDT) Original-Received: from badger (unknown [90.164.198.39]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTPSA id C2AF83AC6; Wed, 13 Jul 2011 04:48:11 -0400 (EDT) In-Reply-To: <4E1AFA72.2050803@gnu.org> (Bruce Korb's message of "Mon, 11 Jul 2011 06:28:18 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) X-Pobox-Relay-ID: D710698E-AD2C-11E0-A41E-B086C023C68D-02397024!a-pb-sasl-sd.pobox.com X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 64.74.157.62 X-BeenThere: bug-guile@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:5725 Archived-At: Hi Bruce, I'm not sure what the bug report here is. I'm getting a lot of angst though :-) On Mon 11 Jul 2011 15:28, Bruce Korb writes: > 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. But if I understand you correctly, here you would like to manipulate *byte sequences* as strings. Strings are logically character sequences, so you need to choose a mapping that preserves the identity of bytes with characters. That mapping is latin-1. In the NEWS for 2.0.0: ** New procedures: `scm_to_stringn', `scm_from_stringn' ** New procedures: scm_{to,from}_{utf8,latin1}_symbol{n,} ** New procedures: scm_{to,from}_{utf8,utf32,latin1}_string{n,} These new procedures convert to and from string representations in particular encodings. Users should continue to use locale encoding for user input, user output, or interacting with the C library. Use the Latin-1 functions for ASCII, and for literals in source code. Use UTF-8 functions for interaction with modern libraries which deal in UTF-8, and UTF-32 for interaction with utf32-using libraries. Otherwise, use scm_to_stringn or scm_from_stringn with a specific encoding. See also http://www.gnu.org/software/guile/manual/html_node/Conversion-to_002ffrom-C.html. It sounds like you want scm_{to,from}_latin1_string. On Guile 1.8 and before, you can #define this to scm_{to,from}_locale_string, as earlier versions of Guile did not have the needed string encoding support. Regards, Andy -- http://wingolog.org/