Hello again,
And once again a new (and may be dumb) question:
When using the IDE (that should definitively be separated from the compiler, the first one (the editor) being able to call the compiler "à la vWATCH"), what is for the option "Language"?
http://www.as2.com/qb64/pictures/png/QB64_language_option.png
I guess it's for using different sets of characters inside the IDE, but honestly what are these options?
For me, MICSF_PC_CPxxx doesn't mean any thing!
i.e. what is the option to select to use the french accentued letters in the IDE?
Anyone to explain?
These numbers are Code Page numbers, and are the same since MS-DOS days, except for the extended (> 1000) numbers, which have been introduced with Windows. I clearly recall having to
MODE CON CP=860 to have Brazilian Portuguese characters in my MS-DOS computer. More on code pages both on our wiki:
https://qb64.org/wiki/Code_Pages and on Wikipedia:
https://en.wikipedia.org/wiki/Code_pageNow, how does that work in QB64's IDE?
First: you must set a custom font. The builtin emulated VGA font you get with QB64 (_FONT 8 and _FONT 16) is limited to Code Page 437. That's the default original ASCII table (and extended ASCII characters) you see around. We even rely on it to build our nostalgic TUI (Text User Interface).
Head to Options->Display:
[ You are not allowed to view this attachment ]
Then toggle the Custom Font checkbox. In the textbook immediately below it, specify the font file you want to use. In my example I'm using Courier New.
[ You are not allowed to view this attachment ]
Notice I typed a sentence using latin characters, but they don't show up fine. What in Portuguese are characters like
ã, á, é, etc, are just special symbols in the default ASCII table. How do I get these to show properly? I make QB64 use _MAPUNICODE internally to map the characters to the proper UNICODE entry points so that my custom font can display them:
[ You are not allowed to view this attachment ]
But the drawback is: extended ASCII characters are also used to draw the interface. So you have to decide if displaying these special characters is so important for your *editing* that you can give up a pretty looking nostalgic TUI. Go to Options->Language and choose the proper codepage for your language. For me, it's CP-1252 (the same I give support to in InForm):
[ You are not allowed to view this attachment ]
Now look at my sentence! Pretty in Portuguese. But look at the interface... those lines are now other Portuguese Characters too.
[ You are not allowed to view this attachment ]
That's basically it. You can have your own programs also display proper characters for your language provided you use a custom font and do the proper _MAPUNICODE mapping (as per the wiki) - and also provided you don't use line drawing characters, as these are also assigned to special letters with diacritics.
Another detail: I get to *type* accented letters by entering the accent (~) and the desired letter (a)
real fast. That results in
ã for me. Your mileage may vary.