[Impromptu] Using non-English characters

Glen F holaglen at gmail.com
Sun Mar 8 18:37:08 GMT 2009


Hi there, I was wondering if there is any way to use non-English  
characters in Impromptu.  It seems to convert accented characters to  
non-accented ones in string quoting...

(define text "Pués, ¡bueno!")
(print text)

This prints "Pues, !bueno!", having converted the 'é' and the '¡' to  
'e' and '!' respectively...

I've managed to get a non-English string in several ways...for  
example, loading in a text file that contains these characters.  Or,  
doing something like this:

(define *e-acute* (integer->char 142))
(define *!-invert* (integer->char 193))

(define text (string-append "Pu" (string *e-acute*) "s, " (string *!- 
invert*) "bueno!"))
(print text)

This prints the correct string.  However, sadly, if I try to use  
gfx:draw-text with such a string, I get nothing...  Using gfx:add- 
text to a path, I get the string with the special characters skipped.

(gfx:make-canvas))
(gfx:clear-canvas (now) *canvas* '(0 0 0 1))
(define *text-style* (gfx:make-text-style "Arial" 24.0 (list 1 1 1 1)))
(gfx:draw-text (now) *canvas* text *text-style* '(50 50))

Is there any way to be able to display non-English characters in  
Impromptu?  I'm not asking for full multi-byte/Unicode character  
support or anything, just a workaround (the ones I'm interested in  
are still 8-bit ASCII characters)...

Thanks,
Glen.



More information about the Impromptu mailing list