Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Can I use a non-latin charset in my FreeBASIC apps?

0
Posted

Can I use a non-latin charset in my FreeBASIC apps?

0

FreeBASIC has the Unicode support provided by the C runtime library for the given platform. This means FB DOS won’t help you with Unicode. On other platforms you can use Wstrings to support any charset you need. The File OPEN keyword has an additional Encoding parameter allowing for different encodings. As FreeBASIC is coded itself in FB, this means you can code your source in an Unicode editor so the comments and string literals can be in any character set (keywords, labels and names for variables and procedures must be kept inside the ASCII set..). For the output to screen the support is different from console to graphics. In console mode wstring printing in non latin charsets is supported if the console font supports them. Graphics mode uses an internal CP437 charset (the old DOS charset) font so non-latin output requires a custom made raster font and the use of the DRAW STRING keyword. Third party tools exist to grab an external font and convert it to the DRAW STRING format.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123