Hi to all. I hope to be the right place to post my little code.
For a long time I wanted to be able to make my own applications in QB64 but I had the difficulty with the little English I know and with the little time I have, how to be able to see Greek characters in my applications. And voila.
Thats it
Do you have a nice day from beautiful Greece.
Gaslouk
For a long time I wanted to be able to make my own applications in QB64 but I had the difficulty with the little English I know and with the little time I have, how to be able to see Greek characters in my applications. And voila.
Code: (Select All)
REM My Greek Letters
SCREEN _NEWIMAGE(800, 600, 32) ' Create new screen
' Load a font that supports Greek characters
fontfile$ = "C:\windows\fonts\lucon.ttf"
f& = _LOADFONT(fontfile$, 20, "MONOSPACE")
_FONT f&
PRINT "Αν δεν θες να περιμένεις πάτα ένα πλήκτρο"
PRINT "If you don't want to wait pushing a button."
sleep 10
GreekChange
PRINT "Αν δεν θες να περιμένεις πάτα ένα πλήκτρο"
PRINT "If you don't want to wait pushing a button."
sleep 10
EnglChange
PRINT "Αν δεν θες να περιμένεις πάτα ένα πλήκτρο"
PRINT "If you don't want to wait pushing a button."
sleep 10
EXODOS:
SYSTEM
SUB GreekChange
RESTORE GreekUnicodeMap
FOR ASCIIcode = 128 TO 255
READ unicode
_MAPUNICODE unicode TO ASCIIcode
NEXT
GreekUnicodeMap:
'Microsoft_windows_cp1253
DATA 8364,0,8218,402,8222,8230,8224,8225,0,8240,0,8249,0,0,0,0
DATA 0,8216,8217,8220,8221,8226,8211,8212,0,8482,0,8250,0,0,0,0
DATA 160,901,902,163,164,165,166,167,168,169,0,171,172,173,174,8213
DATA 176,177,178,179,900,181,182,183,904,905,906,187,908,189,910,911
DATA 912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927
DATA 928,929,0,931,932,933,934,935,936,937,938,939,940,941,942,943
DATA 944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959
DATA 960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,0
END SUB
SUB EnglChange
RESTORE EnglUnicodeMap
FOR ASCIIcode = 128 TO 255
READ unicode
_MAPUNICODE unicode TO ASCIIcode
NEXT
EnglUnicodeMap:
'Microsoft_pc_cp437
DATA 199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197
DATA 201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402
DATA 225,237,243,250,241,209,170,186,191,8976,172,189,188,161,171,187
DATA 9617,9618,9619,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488
DATA 9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575
DATA 9576,9572,9573,9561,9560,9554,9555,9579,9578,9496,9484,9608,9604,9612,9616,9600
DATA 945,223,915,960,931,963,181,964,934,920,937,948,8734,966,949,8745
DATA 8801,177,8805,8804,8992,8993,247,8776,176,8729,183,8730,8319,178,9632,160
END SUB
Thats it
Do you have a nice day from beautiful Greece.
Gaslouk