From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?iso-8859-1?Q?Court=E8s?=) Newsgroups: gmane.lisp.guile.devel Subject: Re: Wide strings status Date: Wed, 22 Apr 2009 22:03:01 +0200 Message-ID: <878wlse9sa.fsf@gnu.org> References: <1240279908.3133.76.camel@localhost.localdomain> <87bpqpu1r4.fsf@gnu.org> <1240370780.3133.102.camel@localhost.localdomain> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1240430913 15429 80.91.229.12 (22 Apr 2009 20:08:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 22 Apr 2009 20:08:33 +0000 (UTC) Cc: guile-devel@gnu.org To: Mike Gran Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Apr 22 22:09:53 2009 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LwilO-0006u8-Bb for guile-devel@m.gmane.org; Wed, 22 Apr 2009 22:09:47 +0200 Original-Received: from localhost ([127.0.0.1]:37702 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lwijz-0005xB-EK for guile-devel@m.gmane.org; Wed, 22 Apr 2009 16:08:19 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lwiez-0000Jw-HA for guile-devel@gnu.org; Wed, 22 Apr 2009 16:03:09 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lwiev-0000IH-1E for guile-devel@gnu.org; Wed, 22 Apr 2009 16:03:09 -0400 Original-Received: from [199.232.76.173] (port=35531 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lwieu-0000IE-Ts for guile-devel@gnu.org; Wed, 22 Apr 2009 16:03:04 -0400 Original-Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:48000) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.60) (envelope-from ) id 1Lwieu-0005ZP-3W for guile-devel@gnu.org; Wed, 22 Apr 2009 16:03:04 -0400 X-IronPort-AV: E=Sophos;i="4.40,232,1238968800"; d="scan'208";a="26654918" Original-Received: from reverse-83.fdn.fr (HELO nixey) ([80.67.176.83]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES128-SHA; 22 Apr 2009 22:03:02 +0200 X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 3 =?iso-8859-1?Q?Flor=E9al?= an 217 de la =?iso-8859-1?Q?R=E9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 821D 815D 902A 7EAB 5CEE D120 7FBA 3D4F EB1F 5364 X-OS: i686-pc-linux-gnu In-Reply-To: <1240370780.3133.102.camel@localhost.localdomain> (Mike Gran's message of "Tue, 21 Apr 2009 20:26:20 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.90 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:8457 Archived-At: Hello! Mike Gran writes: > On Tue, 2009-04-21 at 23:37 +0200, Ludovic Court=E8s wrote: >> You seem to imply that `scm_getc ()' will now return a Unicode >> codepoint, is that right? What about `scm_c_{read,write} ()', and >> `scm_{get,put}s ()'? >>=20 > > I vacillate on this, but, I think the most logical approach is to have > scm_getc return codepoints and to have the rest of those functions > return strings that could contain wide characters. Hmm, `scm_c_{read,write} ()' are biased toward binary data, according to the manual and to their prototype (they take `void *' buffers). So I would keep them this way. `scm_puts ()' is more of a concern since it takes a `char *', which the caller may consider an 8-bit-encoded, null-terminated string. We should probably deprecate it, and have it return an ISO-8859-1 string, transcoding as necessary. And `scm_gets ()' doesn't exist actually. ;-) > This is if and only > if the port has been assigned a character encoding. If it doesn't have > an associated encoding, ports will be treated as de facto ISO-8859-1, > where character values between 0 and 255 are stored without any > interpretation and characters greater than 255 are invalid. (Unicode > codepoints 0 to 255 are by design the same as ISO-8859-1.) OK. Thanks, Ludo'.