[Openmcl-devel] encoding/decoding clozure strings to/from UTF-8

Raymond Wiker rwiker at gmail.com
Tue Dec 30 20:31:24 UTC 2014

> On 30 Dec 2014, at 20:49 , Ralf Mattes <rm at seid-online.de> wrote:
> On Tue, Dec 30, 2014 at 11:46:36AM -0800, Ron Garret wrote:
>> You’re working way too hard.  Character streams automatically do work for you.  All character streams in CCL have a parameter that sets their character encoding, and the default is UTF-8.  So unless you want a different encoding, you should just be able to output characters to a stream and the Right Thing will happen.  If it doesn’t, then either your default encoding has changed somehow, or you’ve found a bug in CCL.
> Well, this is about HTTP, isn't it? Unfortunately, in HTTP you either need to use a byte stream or 
> neet to use a stream which can switch encoding while open (an HTTP header always needs to be RFC 822
> conformant (7bit ASCII) while the content part can have a custom encoding.
> Mark, before you reinvent the wheel: have a look at flexi-streams (http://weitz.de/flexi-streams/ <http://weitz.de/flexi-streams/>), a library
> written to solve exactly this problem (or you might want to base your server on hunchentoot which does all the
> ugly encoding for you …)

+1 for hunchentoot – it’sa pretty nifty piece of software. 

> HTH, and a happy new year

+1 for that, too :-)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.clozure.com/pipermail/openmcl-devel/attachments/20141230/3fe538df/attachment.html>

More information about the Openmcl-devel mailing list