fbc icon indicating copy to clipboard operation
fbc copied to clipboard

Support for non-English IBM/DOS character sets

Open ercanersoy opened this issue 3 years ago • 4 comments

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.

ercanersoy avatar Nov 12 '20 19:11 ercanersoy

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.

rversteegen avatar Nov 13 '20 08:11 rversteegen

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.

ercanersoy avatar Nov 23 '20 05:11 ercanersoy

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).

rversteegen avatar Nov 23 '20 06:11 rversteegen

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

ercanersoy avatar Jul 03 '21 06:07 ercanersoy