Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
An interesting side effect of interaction between QB64PE and Windows
#1
I wanted to create a list of the QB/QB64 box-drawing characters that are emulated in the bytes above 127. But, what you see on screen may not be what you get from Windows.

I wrote a program to show all the different combinations of boxes one can create with the QB character set from Windows code page 437. So look at the following program, which modifies itself. Try loading and running this from the same directory that it is saved to.


.bas   box_drawing.bas (Size: 1.77 KB / Downloads: 141)

Run this program from the QB64/QB64PE IDE, and notice the line drawing characters shown on screen? Using standard cmd copy/paste methods, hi light the text, then press enter to copy them. Try pasting them onto your screen, you get garbage. I suspected that intra-program copy/paste would work, but not between programs. So I added an INPUT statement and a print of what was typed.

But now, try reloading the program from disk, and the characters it posted to itself are what you would expect.

This confirmed what I suspected. When copy/paste in the same program, they can use any format for text. Transferring text from one program to another, I suspect Windows probably expects UTF-8 (or UTF-16) and if not there, it produces junk.

I found this quite amusing.
While 1
   Fix Bugs
   report all bugs fixed
   receive bug report
end while
Reply
#2
True, UTF-8. I recall some output as the Windows "I don't know!" character, but that post was too long ago for my aged memory to recapture.

Pete


Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  PictureButton Rollover effect TempodiBasic 4 1,191 10-24-2024, 01:08 AM
Last Post: TempodiBasic
  Multiscreen effect TempodiBasic 7 1,758 07-20-2024, 06:03 PM
Last Post: TempodiBasic
  ImagePop - puts image on screen with a little popup effect Dav 2 1,016 05-29-2024, 03:45 PM
Last Post: Dav
  Cruft Cleaner for QB64PE Windows installations JRace 3 1,054 12-29-2023, 06:01 PM
Last Post: Kernelpanic
  Small exploding image and fade-out effect Dav 18 3,507 09-08-2023, 11:16 PM
Last Post: dbox

Forum Jump:


Users browsing this thread: 1 Guest(s)