unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Mike Gran <spk121@yahoo.com>
To: Guile User <guile-user@gnu.org>
Subject: Transcoder library
Date: Sun, 29 Mar 2009 20:02:24 -0700 (PDT)	[thread overview]
Message-ID: <124537.51690.qm@web37906.mail.mud.yahoo.com> (raw)


Hi-

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.

Basically, one would create a transcoder like this...

(define TC (make-transcoder "UTF-8"))

... and then use it either to read codepoints from encoded files ...

(read-codepoint PORT TC)
(write-codepoint CODEPOINT PORT TC)

... or convert to/from vectors of codepoints ...

(locale-string->u32vector STRING TC)
(u32vector->locale-string U32VECTOR TC)

Not very useful on its own, but, perhaps will have more utility in the
future if someone implements R6RS ports and Unicode-enable
Guile.  ;-)

There's more info about it at http://lonelycactus.com/transcoder.html

-Mike Gran





             reply	other threads:[~2009-03-30  3:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-30  3:02 Mike Gran [this message]
2009-04-01 21:24 ` Transcoder library Ludovic Courtès
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=124537.51690.qm@web37906.mail.mud.yahoo.com \
    --to=spk121@yahoo.com \
    --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).