freebasic / fbc

FreeBASIC is a completely free, open-source, multi-platform BASIC compiler, with syntax similar to MS-QuickBASIC, that adds new features such as pointers, object orientation, unsigned data types, inline assembly, and many others.
https://www.freebasic.net
877 stars 137 forks source link

Support for non-English IBM/DOS character sets #268

Open ercanersoy opened 3 years ago

ercanersoy commented 3 years ago

Hello,

I would like use FreeBASIC. But, FreeBASIC does not support non-English IBM/DOS character sets on graphical screen modes.

I would like to add support non-English IBM/DOS character sets on graphical screen modes?

Thanks.

rversteegen commented 3 years ago

For graphical (SCREEN) modes, FB uses a hardcoded code page 437 (US English IBM PC) font in one of three resolutions. You can find these fonts at src/gfxlib2/gfxdata. So the first step would be to add more there.

There are many code pages, but I suppose that just a few are common, so it would be nice to have them. (I've personally run into the problem of gfxlib2 not supporting the default system codepage.) And they are LZW compressed, and there's heaps of redundancy between different code pages. But I wouldn't want gfxlib2 to be bloated with a hue number of them.

BTW, if you use raw console output instead of a graphical mode, then FB can output whatever the native encoding is, e.g. typically UTF-8 on Unix.

ercanersoy commented 3 years ago

I would like use code page is other than 437 graphical modes.

In DOS, I use code page 857. But, FreeBASIC is replace the code page to 437.

Is FreeBASIC load internal font on DOS for screen modes?

Thanks.

rversteegen commented 3 years ago

No, FB does not load system fonts. If you want to display text with the system code page you must use text mode, not a graphical mode (don't call screen or screenres).

ercanersoy commented 3 years ago

I would like to FreeBASIC not use a hardcoded codepage in DOS. FreeBASIC doesn't need to a hardcoded codepage in DOS.