04-30-2025, 07:01 PM
Someone is asking about displaying French characters, here:
https://qb64.boards.net/thread/416/displ...characters
https://qb64.boards.net/thread/416/displ...characters
b = b + ...
Displaying French characters?
|
04-30-2025, 07:01 PM
Someone is asking about displaying French characters, here:
https://qb64.boards.net/thread/416/displ...characters
b = b + ...
Here it is, is used Google translator, I only know "good morning" in French
![]() Program create french text on the screen and also try create french named file and then test it if it exist and write message in french to screen. It works fine in my system (Win10) Code: (Select All)
05-06-2025, 02:45 PM
(04-30-2025, 08:07 PM)Petr Wrote: Here it is, is used Google translator, I only know "good morning" in French Hi Petr, I'm the person who asked the question on the QB64 site. I wanted to thank you for your help earlier, but I had some trouble registering here... Your code works perfectly on my Win7. So thank you! But since we're never satisfied, I realize now that I would have liked to use in my program those fancy little input boxes ![]() Do you think it's possible to use a code similar to the one you developed above to go back to the classic ASCII table and then call one routine or the other with a CALL or a GOSUB as required? And how ? Sorry if the question sounds simplistic, but I've learned coding in the 80s using GWBasic, under DOS. Loooong time ago ! ![]() Alex
Hi, glad it help. I solved this in the past too, for Czech. What you suggest is certainly possible, but you will have to watch the unicode page that you set before printing the text to the screen.
I am adding a program that shows how you can use multiple code pages at once. That is why the text in French is intentionally printed "wrong" this time - with the American MS-DOS code page and then the code page is thrown back to 1252 so that it supports French. Interesting question, this is my first time doing this. While writing the program I found that it is necessary to use a graphics screen to be able to display different types of encoding. If you use Screen 0, only the first type (1252) is set and then it does not change. I assume that this is intentional, because the text screen 0 can only hold 256 characters, while the graphics screen approaches the image differently and will draw anything. The numbers for the DATA blocks are obtained from the help: In the IDE, press Shift+F1 together, click on Kws_Alphab, then write: "Mapunicode" click on _MapUnicode (statement), scroll down in the help window and click on Code Pages there. That will lead you to the supported encoding types. Maybe someone will add a link directly to the QB64PE wiki here? Code: (Select All)
Wow ! As I told last time to bplus on "his" own forum : "you're fast!"
Thank you for your advice and the code. I should come up with something good with this. It may take a little time but it's all to the good, it's making me slowly revise all my knowledge of Basic. (Sometimes I realize that I've forgotten essential things, even in the syntax that I used to know well). Thanks again! And btw I went on your Youtube channel: nice Tetris! ![]()
05-06-2025, 06:14 PM
Thank you, it's been a long time since I tried to write my own version of Tetris (clone), it doesn't respect the rules (number of columns and shapes and rotation options) like the original - but in principle it works correctly.
If you need anything else, feel free to contact me. And - welcome to this forum! ![]() |
« Next Oldest | Next Newest »
|