![]() |
|
Displaying French characters? - Printable Version +- QB64 Phoenix Edition (https://qb64phoenix.com/forum) +-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1) +--- Forum: Code and Stuff (https://qb64phoenix.com/forum/forumdisplay.php?fid=3) +---- Forum: Help Me! (https://qb64phoenix.com/forum/forumdisplay.php?fid=10) +---- Thread: Displaying French characters? (/showthread.php?tid=3653) |
Displaying French characters? - bplus - 04-30-2025 Someone is asking about displaying French characters, here: https://qb64.boards.net/thread/416/displaying-french-characters RE: Displaying French characters? - Petr - 04-30-2025 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)
RE: Displaying French characters? - bplus - 04-30-2025 +1 Thank you @Petr I will pass on the link. RE: Displaying French characters? - Alex-Ubik - 05-06-2025 (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 we used to create in basic in the 80's using the single and double lines around the characters 176 to 218. (╚══╩═ ... ──┤an so on)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 RE: Displaying French characters? - Petr - 05-06-2025 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)
RE: Displaying French characters? - Alex-Ubik - 05-06-2025 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!
RE: Displaying French characters? - Petr - 05-06-2025 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!
|