[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: UTF-8 and new ports

From: Ludovic Courtès
Subject: Re: UTF-8 and new ports
Date: Fri, 15 Feb 2008 09:36:24 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)


Mike Gran <address@hidden> 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

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]