[fpc-pascal] Pseudographics in FPC-IDE

Anton Shepelev anton.txt at gmail.com
Thu Jun 16 17:59:53 CEST 2011


Nikolay Nikolov:

> [kbd_mode]  only  works  on  the linux console. It
> doesn't work under xterm, gnome-terminal, konsole,
> etc  and we still need a way to detect if they are
> in UTF-8 mode or not.

But at least that will make the IDE  work  correctly
in the true console... As for the graphical ones, to
assume their mode as UTF-8 is much  safer,  but  the
vector  fonts  may  not  have the drawing characters
anyway...

> IIRC, it only checks if the keyboard input  is  in
> UTF-8 mode. What we actually care about is whether
> the console output (not input) is in  UTF-8  mode.
> But I guess it's ok to assume that if the input is
> UTF-8, then then output is also most likely to  be
> UTF-8.

As  I  understand,  the console mode defines the way
the input bytes are treated all  the  way  from  the
initial keycode to the charater address in the font.
Therefore, it must be taken into account when decid-
ing  what keycode to send to get an expected charac-
ter:

    http://tldp.org/HOWTO/Keyboard-and-Console-HOWTO-6.html

When not in unicode mode, an  additional ACM is used
to get the Unicode value of a keysym:

    http://www.tin.org/bin/man.cgi?section=8&topic=consolechars

> I don't like the  idea  of  having  to  invoke  an
> external  program  and  parse its output, but this
> could be done by directly invoking the ioctl  that
> kbd_mode uses.

Agree.  I did mean to mimic the kbd_mode's mechanism
of determining the console mode.

> Do you know how many linux distros (besides  Puppy
> Linux)  would  need  this? When I came up with the
> 'UTF-8' string  check  in  the  LANG  variable,  I
> tested  Fedora,  Ubuntu,  openSUSE,  Mandriva  and
> Debian and they all worked this way, so I  figured
> it's a de facto standard.

No,  I  haven't done such a research, but I think it
would be nice to have the IDE less dependent on  the
environment  settings.  Otherwise,  this has to be a
system requirement for FP-IDE.

Anton



More information about the fpc-pascal mailing list