From: ludo@gnu.org (Ludovic Courtès)
To: guile-user@gnu.org
Subject: Re: Transcoder library
Date: Wed, 01 Apr 2009 23:24:08 +0200 [thread overview]
Message-ID: <87tz58dq4n.fsf@gnu.org> (raw)
In-Reply-To: 124537.51690.qm@web37906.mail.mud.yahoo.com
Hi Mike,
Mike Gran <spk121@yahoo.com> writes:
> R6RS describes a transcoder library that converts locale strings to
> codepoints and back. I put together something that is like the
> library described in R6RS.
That's good news!
> Basically, one would create a transcoder like this...
>
> (define TC (make-transcoder "UTF-8"))
It's nice you already have a first stab at this API.
> ... and then use it either to read codepoints from encoded files ...
>
> (read-codepoint PORT TC)
> (write-codepoint CODEPOINT PORT TC)
That would be roughly equivalent to the procedures in R6RS Section
8.2.9, right?
> ... or convert to/from vectors of codepoints ...
>
> (locale-string->u32vector STRING TC)
> (u32vector->locale-string U32VECTOR TC)
FWIW, I implemented the `string->utf*' and `utf*->string' procedures in
Guile-R6RS-Libs [0,1] using the relevant Gnulib modules. I'm planning
to integrate it in Guile `master' at some point; would that be helpful
to you to put it all together?
Thanks,
Ludo'.
[0] http://www.fdn.fr/~lcourtes/software/guile/guile-r6rs-libs-0.1.tar.gz
[1] http://repo.or.cz/w/guile-r6rs-libs.git
next prev parent reply other threads:[~2009-04-01 21:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-30 3:02 Transcoder library Mike Gran
2009-04-01 21:24 ` Ludovic Courtès [this message]
2009-04-02 5:46 ` Mike Gran
2009-04-04 23:15 ` Ludovic Courtès
2009-04-08 7:33 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87tz58dq4n.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=guile-user@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).