unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Transcoder library
@ 2009-03-30  3:02 Mike Gran
  2009-04-01 21:24 ` Ludovic Courtès
  0 siblings, 1 reply; 5+ messages in thread
From: Mike Gran @ 2009-03-30  3:02 UTC (permalink / raw)
  To: Guile User


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





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-04-08  7:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-30  3:02 Transcoder library Mike Gran
2009-04-01 21:24 ` 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

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).