[BRLTTY] FWD: Re: A dos character problem

Samuel Thibault samuel.thibault at ens-lyon.org
Thu May 10 19:47:51 EDT 2007


Hi,

Lars Bjørndal, le Thu 10 May 2007 21:08:55 +0200, a écrit :
> Hm.. I want to read something that let me identify all characters, what
> ever they are.

Ok. There are actually several issues, which I hope will be more or less
resolved on the long run:

- VGA boards can't display more than 256 or 512 characters at the same
  time (that's the "VGA font"). Distribution usually only provide 256
  character fonts, and hence are limited to a given 8bit charset (in
  the case of lat1-16 for instance, this is latin1 plus a few extra
  characters).
- Unfortunately, Linux has exactly the same limitation concerning what
  is expressed in /dev/vcsa, and this maps to the VGA font that is
  loaded.
- Eventually, BRLTTY braille tables use a given 8bit character set,
  which is not necessarily the same as the one of the font.

The result of this is your situation:

- DOS uses the CP850 8bit character set, which is not really like
  latin1. Let's consider for instance CP850 characters 179 (BOX DRAWINGS
  LIGHT VERTICAL) and 252 (SUPERSCRIPT THREE).
- The font you have loaded is lat1-16, which covers latin1 (in which
  SUPERSCRIPT THREE exists) plus some extra characters of CP850, like
  the "BOX DRAWINGS LIGHT VERTICAL". Hence both characters show up fine
  on the screen
- The braille table you have loaded is no-h, which is based on latin1.
  Since BOX DRAWINGS LIGHT VERTICAL is _not_ in latin1, BRLTTY doesn't
  know how to render it: it's not in no-h!  SUPERSCRIPT THREE is however
  rendered as 14678 because it is in latin1.

With iso01-16, you wouldn't even have BOX DRAWINGS LIGHT VERTICAL
display correctly on the screen, just because that font doesn't have it.
/dev/vcsa wouldn't announce it either, and hence BRLTTY would even less
be able to render it.

Several solutions that should come on the long run:

- A more unicode-friendly linux console, which wouldn't be limited by
  fonts, that would be able to mix several fonts, etc. so that /dev/vcsa
  at least have all unicode information, no "unknown character".
- A unicode-friendly brltty, which would be able to mix several braille
  tables.

On the short run, you have to stick to 8bit: since your DOS application
uses CP850 as character set, then load the cp850 font, so that Linux
will be able to display all characters on the screen and express them in
/dev/vcsa. Then, write a CP850 braille table with the braille patterns
you'd like to see. Finally, run brltty in a CP850 locale: add for
instance
no_NL.CP850 CP850
to your /etc/locale.gen, and re-run locale-gen. Then run brltty this
way:

LC_CTYPE=no_NL.CP850 brltty ...

Samuel


More information about the BRLTTY mailing list