1) UTF-8 encoded text doesn't seem to work at all with bitmap fonts. At least I haven't found yet a bitmap font which would work with it, while they do work with some other programs even with UTF-8 encoded content.
2) With truetype fonts it works with TextOut and CreateTextObject functions, but doesn't work with Print or NPrint functions. Documentation tells it should work with these all when set with SetDefaultEncoding.
Code: Select all
s$="Räikkönen" ; String with UTF-8 data
SetDefaultEncoding(#ENCODING_UTF8)
; Test with a truetype font
SetFont(#SANS,15)
NPrint(s$) ; Doesn't print correctly
Print(s$) ; Doesn't print correctly
CreateTextObject(1,s$)
DisplayTextObject(1,0,30) ; Prints correctly
TextOut(0,45,s$) ; Prints correctly
; Test with a bitmap font
SetFont(#BITMAP_DEFAULT,8)
CreateTextObject(1,s$)
DisplayTextObject(1,0,100) ; Doesn't print correctly
TextOut(0,120,s$) ; Doesn't print correctly
WaitLeftMouse