[plt-scheme] bytes, chars, mzchars

From: tom sgouros (tomfool at as220.org)
Date: Thu Jan 10 07:55:12 EST 2008

Hello all:

An extension I've written to mzscheme returns a byte-string array like
this:

    return scheme_make_sized_byte_string(outbuf,-1,1);

Where outbuf is  an array of char values.

I see that if outbuf contains \177, it displays as \277 after it's been
returned, within the mzscheme environment.  I'm imagining that this is
because mzscheme uses the UCS encoding internally.  Is that correct?

For this application, I have a function that would like to receive a
single (8-bit) char value.  I notice that there doesn't seem to be a
SCHEME_BYTE_VAL() extractor for single chars, comparable to the
SCHEME_BYTE_STR_VAL() analog to SCHEME_CHAR_STR_VAL().  What can I use
to extract the eight-bit value I need?

Many thanks,

 -tom

-- 
 ------------------------
 tomfool at as220 dot org
 http://sgouros.com  
 http://whatcheer.net


Posted on the users mailing list.