[fpc-pascal] Pseudographics in FPC-IDE

Anton Shepelev anton.txt at gmail.com
Wed Jun 15 15:15:46 CEST 2011


Nikolay Nikolov:

> Basically,  all  it does is, it checks if the LANG
> variable contains ґUTF-8' as a substring (not sure
> if  it is the right way to do it, but it works for
> Fedora,  Ubuntu,  OpenSUSE,  Mandriva  and  latest
> Debian) and if it does, it writes UTF-8 characters
> to the console, by  using  an  internal  CP437  to
> UTF-8 conversion table.

Then my guessing was correct, but in this case there
is a better solution.  Instead  of  relying  on  the
value of LANG, FP-IDE should directly check the con-
sole mode. This can be  done  using  the  'kbd_mode'
command. If the mode reported is UTF-8, then use the
translation table, otherwise assume CP437.

At least, this will make it more reliable with UTF-8
consoles.

Anton



More information about the fpc-pascal mailing list