Hi,

Mike Gran <[EMAIL PROTECTED]> writes:

> It seems that port types are inherently 8-bit, right? 
> So to make this work, the ports will have to store and
> transmit characters as UTF-8 encoded data.

Indeed, the C port API in inherently 8-bit.

I don't know if it helps, but Guile-R6RS-Libs[*] provides limited UTF
handling:

  guile> (use-modules (r6rs bytevector) (r6rs io ports))
  guile> (define bv (get-bytevector-all (open-input-string "hello world")))
  guile> (utf8->string bv)
  "hello world"

It assumes that Guile strings are encoded in the current locale's 8-bit
charset, though...

Thanks,
Ludovic.

[*] http://repo.or.cz/w/guile-r6rs-libs.git



Reply via email to