Text won't display certian characters

Archives Forums/BlitzPlus Bug Reports/Text won't display certian characters

schilcote(Posted 2009) [#1]
This code works.

;Text example 

; enable graphics mode 
Graphics 800,600,16 

; wait for ESC key before ending 
While Not KeyHit(1) 
;print the text, centered horizontally at x=400, y=0 
Text 400,0,"Hello World!",True,False 
Flip
Wend 


This code works.
While Not KeyHit(1) 
Print Chr$(1)
Wend 


This code does not.

;Text example 

; enable graphics mode 
Graphics 800,600,16 

; wait for ESC key before ending 
While Not KeyHit(1) 
;print the text, centered horizontally at x=400, y=0 
Text 400,0,Chr$(1),True,False 
Flip
Wend 


Why? I think this is a bug.


xlsior(Posted 2009) [#2]
the 'text' command in a graphical environment is different than the output in the console. First of all the font used in the graphics mode does not have the extended characters available like the console does.
Secondly a bunch of the 'special' control codes are not supported either: for example, you can't print things like Chr$(8) for a backspace, or chr$(13) to go to the next line, or chr$(7) to hear a beep


schilcote(Posted 2009) [#3]
Oh. Well. Hmm... How would I display these characters then?


xlsior(Posted 2009) [#4]
Oh. Well. Hmm... How would I display these characters then?


...You don't, unless you make your own bitmap font and drawing routines.

Do note that this is not just a Blitz limitation, you'll run into this with most programming languages/libraries: not all ASCII characters are treated equally.