12-06-2025, 02:36 PM
My English is quite basic, so all the program descriptions and code comments I posted were translated into English using Deepseek.
Actually, the core issue is that most members on this forum are from Latin language backgrounds, and they don't face the same Chinese character display problems that I do. There were no existing posts on this topic in the forum, so I had to explore and test everything myself. I studied lots of documentation and Unicode articles, and only posted after successfully getting it to work. Some experts might even think this simple code isn't worth mentioning.
The code itself doesn't contain any advanced technical concepts for forum experts—it's just that no one had posted about this before. Steven's solution is excellent—he saves text as UTF-8 files, reads UTF-8 formatted text, and displays it using _UPrintString with parameter 8.
However, as I mentioned earlier, my problem is that I need to display Chinese character strings that are assigned within my code and entered by users in graphics mode. Clearly, Steven's high-quality code can't solve this, because strings assigned in QB or obtained via INPUT use ANSI encoding by default. These need to be converted to Unicode16 or UTF-8 encoding before they can be displayed using _UPrintString with parameter 8 or 16. That's why I even wrote a UTF-16 → UTF-8 conversion function in QB for testing, to confirm this approach would work.
Of course, this explanation is also translated by Deepseek. I'm not even sure if the translation accurately conveys what I mean. This code is just meant to provide a reference for others who have similar needs and are at a similar skill level as me.
Actually, the core issue is that most members on this forum are from Latin language backgrounds, and they don't face the same Chinese character display problems that I do. There were no existing posts on this topic in the forum, so I had to explore and test everything myself. I studied lots of documentation and Unicode articles, and only posted after successfully getting it to work. Some experts might even think this simple code isn't worth mentioning.
The code itself doesn't contain any advanced technical concepts for forum experts—it's just that no one had posted about this before. Steven's solution is excellent—he saves text as UTF-8 files, reads UTF-8 formatted text, and displays it using _UPrintString with parameter 8.
However, as I mentioned earlier, my problem is that I need to display Chinese character strings that are assigned within my code and entered by users in graphics mode. Clearly, Steven's high-quality code can't solve this, because strings assigned in QB or obtained via INPUT use ANSI encoding by default. These need to be converted to Unicode16 or UTF-8 encoding before they can be displayed using _UPrintString with parameter 8 or 16. That's why I even wrote a UTF-16 → UTF-8 conversion function in QB for testing, to confirm this approach would work.
Of course, this explanation is also translated by Deepseek. I'm not even sure if the translation accurately conveys what I mean. This code is just meant to provide a reference for others who have similar needs and are at a similar skill level as me.

