guile-user
[Top][All Lists]
Advanced

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

Re: UTF-8 and new ports


From: Stephen Compall
Subject: Re: UTF-8 and new ports
Date: Thu, 14 Feb 2008 20:39:52 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (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.  The
> 'fill_input' function will have to convert UTF-32 to
> UTF-8 and then cache them, passing them 1 byte at a
> time as requested.  The 'write' function will receive
> data 1 byte at a time and buffer it.  It will only
> write the character when a complete UTF-32 codepoint
> has been received.

Alternatively, you could assume an 8-bit character set (either from
CTYPE, or force Latin-1), recode output to UTF-32, and either ignore
or deliver nulls or something else convenient (maybe space?) for
characters outside the 8-bit character set.  This would be reasonable as
Guile characters are 8-bit anyway.

-- 
But you know how reluctant paranormal phenomena are to reveal
themselves when skeptics are present. --Robert Sheaffer, SkI 9/2003




reply via email to

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