From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.lisp.guile.user Subject: Re: I'm looking for a method of converting a string's character encoding Date: Mon, 30 Apr 2012 15:21:14 +0300 Message-ID: <83wr4x5s1x.fsf@gnu.org> References: <87obqbwykh.fsf@gnuvola.org> <834ns37f0b.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: dough.gmane.org 1335788495 15824 80.91.229.3 (30 Apr 2012 12:21:35 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 30 Apr 2012 12:21:35 +0000 (UTC) Cc: guile-user@gnu.org, ttn@gnuvola.org, sunjoong@gmail.com To: Daniel Krueger Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Mon Apr 30 14:21:33 2012 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SOpbg-0001fZ-HY for guile-user@m.gmane.org; Mon, 30 Apr 2012 14:21:32 +0200 Original-Received: from localhost ([::1]:36111 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SOpbd-0006CI-Ms for guile-user@m.gmane.org; Mon, 30 Apr 2012 08:21:29 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:56729) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SOpbY-0006C0-KM for guile-user@gnu.org; Mon, 30 Apr 2012 08:21:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SOpbW-0007Lc-Qi for guile-user@gnu.org; Mon, 30 Apr 2012 08:21:24 -0400 Original-Received: from mtaout23.012.net.il ([80.179.55.175]:65324) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SOpbW-0007LW-Ia for guile-user@gnu.org; Mon, 30 Apr 2012 08:21:22 -0400 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0M3A00300KNAVI00@a-mtaout23.012.net.il> for guile-user@gnu.org; Mon, 30 Apr 2012 15:21:02 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.229.21.156]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M3A003N5KZ1RH50@a-mtaout23.012.net.il>; Mon, 30 Apr 2012 15:21:02 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 80.179.55.175 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:9427 Archived-At: > Date: Mon, 30 Apr 2012 12:18:59 +0200 > From: Daniel Krueger > Cc: ttn@gnuvola.org, guile-user@gnu.org, sunjoong@gmail.com > > I think strings should be encoding `independent', so you don't have to > mind that if you don't need to, and if you're working with a special > encoding you're working on a representation of the `text' as a number > of characters encoded in some numbers, so you use a bytevector. That would do, I think. > The only thing I'm not sure about is whether guile supports encoding a > string (into a bytevector) in some other format than UTF-8, so if > there don't exist other procedures I would suggest adding a string to > bytevector decoder which takes an encoder and the encoders (or just > procedures which convert the string directly into a bytevector in a > specific encoding). > > WDYT? Sounds like a plan to me ;-)