[fpc-pascal] Pseudographics in FPC-IDE
Nikolay Nikolov
nickysn at users.sourceforge.net
Tue Jun 14 21:45:00 CEST 2011
On 06/14/2011 09:33 PM, Anton Shepelev wrote:
> Graeme Geldenhuys:
>
>> You are welcome to add it to the wiki.
> I still do not fully understand the problem, so
> please, review what I have come up with:
>
> On Linux/Unix the FP-IDE calculates the
> addresses of the drawing charactes (also
> called pseudagraphics) based on the LANG
> environment variable, so for the IDE to work
> correctly, its value must correspond with
> the console mode which can be checked using
> the kbd_mode utility.
>
> If the reported console mode is UTF8 then
> the value of LANG must be of the form:
> ll_CC.UTF-8. For most cases en_US.UTF-8
> should work.
>
> Now I don't know for sure what happens with other
> locales. From my own experiments, in this case the
> IDE simply tries to get the pseudographics charac-
> ters from their respective addresses as defined in
> CP437. Is this correct?
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.
More information about the fpc-pascal
mailing list