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.user Subject: Re: A question about scm_{to,from}_locale_string() Date: Sat, 11 Jun 2011 16:19:02 +0200 Message-ID: <87tybw1meh.fsf@gnu.org> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1307802022 24858 80.91.229.12 (11 Jun 2011 14:20:22 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 11 Jun 2011 14:20:22 +0000 (UTC) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sat Jun 11 16:20:18 2011 Return-path: Envelope-to: guile-user@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 1QVP2w-0003EE-J7 for guile-user@m.gmane.org; Sat, 11 Jun 2011 16:20:18 +0200 Original-Received: from localhost ([::1]:37693 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QVP2v-0004KS-LJ for guile-user@m.gmane.org; Sat, 11 Jun 2011 10:20:17 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:45416) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QVP1x-0004KN-2X for guile-user@gnu.org; Sat, 11 Jun 2011 10:19:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QVP1w-0007g8-69 for guile-user@gnu.org; Sat, 11 Jun 2011 10:19:17 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:42870) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QVP1v-0007fw-SF for guile-user@gnu.org; Sat, 11 Jun 2011 10:19:16 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QVP1u-0002pm-Hc for guile-user@gnu.org; Sat, 11 Jun 2011 16:19:14 +0200 Original-Received: from reverse-83.fdn.fr ([80.67.176.83]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 11 Jun 2011 16:19:14 +0200 Original-Received: from ludo by reverse-83.fdn.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 11 Jun 2011 16:19:14 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 21 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: reverse-83.fdn.fr X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 23 Prairial an 219 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: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu User-Agent: Gnus/5.110017 (No Gnus v0.17) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:LDdD/NX0AzJyvBUbiSD/jk/tMO8= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:8630 Archived-At: Hello, Peter TB Brett skribis: > All of our strings are encoded as UTF-8, but we can't use > scm_to_utf8_stringn() and scm_from_utf8_string() because they don't > exist in Guile 1.8.8 (which we're going to have to continue to support > for some time). > > The question, then, is whether using scm_{to,from}_locale_string() with > UTF-8 strings will "just work" in both Guile 1.8.8 and Guile 2.0.1 as > long as we make sure that the current locale is a UTF-8 locale? Yes, it should work. However, in Guile 2.0.x, you'd better use scm_{to,from}_utf8_string to avoid relying on the locale settings. You could use a configure check for that. Thanks, Ludo'.