[gambit-list] it-is-bug-for-me

Marc Feeley feeley at iro.umontreal.ca
Thu Oct 22 09:11:00 EDT 2009

On 2009-10-22, at 7:33 AM, Alex Queiroz wrote:

> Hallo,
>     Copying to the list...
> On 10/22/09, DeepFinder <DeepFinder at yandex.ru> wrote:
>> No. Characters wich I send to terminal via (display "some-string")  
>> displayed correctly. But error reports from gsi do not.
>> -:fXX option change encoding of msg send to terminal by standard  
>> (display port item)  procedure. I need an ASCII in error reports of  
>> scheme system itself.
>> Thankee for dirrecting to "The Fine Manual" :)
>     I cannot understand what you are saying. You need "an ASCII" in
> error reports, meaning standard ASCII error reports are garbled?

You probably mean this behaviour:

% gsi -:t8
Gambit v4.5.2

 > (car (string (integer->char 233)))
*** ERROR IN (console)@1.1 -- (Argument 1) PAIR expected
(car "\351")

That is, you would like the \351 octal escape sequence to be replaced  
with the actual character.

In principle the behaviour you desire should be possible using the  
readtable-max-unescaped-char-set procedure.  Here is an example of its  

 > (define rt (output-port-readtable (repl-output-port)))
 > (readtable-max-unescaped-char rt)
 > (string (integer->char 233)))
 > (output-port-readtable-set!
    (readtable-max-unescaped-char-set rt #\U0010ffff))
 > (string (integer->char 233)))

Unfortunately, there's a bug in the REPL... it ignores the repl-output- 
port readtable when it displays the call that generated the error,  
i.e. in the above example, (car "\351") is displayed instead of (car  

I'll fix this soon.  As a general rule, please register such bugs in  
Gambit's bugzilla bug tracking system so they are easier to track and  


More information about the Gambit-list mailing list