From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Krueger Newsgroups: gmane.lisp.guile.user Subject: Re: I'm looking for a method of converting a string's character encoding Date: Sat, 28 Apr 2012 20:29:22 +0200 Message-ID: References: <87obqbwykh.fsf@gnuvola.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1335643394 19607 80.91.229.3 (28 Apr 2012 20:03:14 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 28 Apr 2012 20:03:14 +0000 (UTC) Cc: guile-user@gnu.org, Sunjoong Lee To: Thien-Thi Nguyen Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sat Apr 28 22:03:11 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 1SODrK-0002qx-Kj for guile-user@m.gmane.org; Sat, 28 Apr 2012 22:03:10 +0200 Original-Received: from localhost ([::1]:41583 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SODrK-0003eF-0T for guile-user@m.gmane.org; Sat, 28 Apr 2012 16:03:10 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:43582) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SOCOf-0001yc-Gb for guile-user@gnu.org; Sat, 28 Apr 2012 14:29:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SOCOd-0005E3-Oa for guile-user@gnu.org; Sat, 28 Apr 2012 14:29:29 -0400 Original-Received: from mail-pz0-f51.google.com ([209.85.210.51]:42584) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SOCOd-00058U-FP for guile-user@gnu.org; Sat, 28 Apr 2012 14:29:27 -0400 Original-Received: by dadz8 with SMTP id z8so2102603dad.38 for ; Sat, 28 Apr 2012 11:29:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=obka4o1ms+Ctjc0e6mjbJlnw7Rhzc9srilxpTVHWjMQ=; b=MCaUZH3eBImDp5nOYbCpJP0D9ebCxbJmXiucFehBJ8aJND+MIpd1mGEqQU6lFLw+IF tJB5xfmt1wXTeyqXnlD9I/mElKQYvqMwWxn5tX7KwvZZ0uZ54NfQlaWDECEr/AmwNfxg nvVAi6lVN+mPVPmduV9idZgPnw5TQxHp0WvlNQTnSe5Yt6r26UGMHrLA72jNwYfD6SsD aV9u1SZp1B5WBCnxJ2bdNZSEdMSIz8/S4KL4wnBLq6ZTkEHf/Ew0zGduFz4VH4D3quBQ mueQ4VVZKCPzhxDX5RFA9/+Xh90VjGuZXsBp1YyhaiTg4kQDtIaYM1MAEKxMrwNYwQJv AKYw== Original-Received: by 10.68.197.4 with SMTP id iq4mr163970pbc.115.1335637762952; Sat, 28 Apr 2012 11:29:22 -0700 (PDT) Original-Received: by 10.142.11.21 with HTTP; Sat, 28 Apr 2012 11:29:22 -0700 (PDT) In-Reply-To: <87obqbwykh.fsf@gnuvola.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.210.51 X-Mailman-Approved-At: Sat, 28 Apr 2012 16:03:05 -0400 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:9418 Archived-At: Hi, i think there shouldn't be any transcoding of guile's strings, as strings are internal representation of characters, no matter how they are encoded. So the only time when encoding matters is when it passes it's `internal boundarys', i mean if you write the string to a port or read from a port or pass it as a string to a foreign library. For the ports all transcoding is available, and as said, the real representation of guile strings internally is as utf8, which can't be changed. The only additional thing i forgot about are bytevectors, if you convert a string to an explicit representation, but afaik there you also can give the encoding to use. Am I wrong? - Daniel On Sat, Apr 28, 2012 at 7:33 PM, Thien-Thi Nguyen wrote: > () Sunjoong Lee > () Sun, 29 Apr 2012 01:38:28 +0900 > > =A0 http-get is innocent but I need encoding converter yet. > > It sounds like a good exercise (that would flush out bugs and > raise confidence in the infrastructure) would be to implement > an iconv-workalike program in Scheme. =A0Maybe one already exists? >