Micah Cowan 6866db6fce Fix handling of JIS X 0201 characters
The manpage mentions that the "banner" font supports katakana; this may
be verified by using the "uskata" controlfile, which maps katakana characters
into the 7-bit G0 graphical character codespace:

printf 'ABCDE' | figlet -f banner -C uskata

However, it also claims to suport mixed latin and katakana via the
controlfile jis0201; looking at the control file (without knowing anything
authoritative about the control file syntax), it does appear to (attempt to)
map katakana characters into the 8-bit character space (same positions as
with uskata, except with the high bit set, so that the 7-bit space may be
reserved for ASCII latin characters). However, it doesn't actually work:

printf '\xB1\xB2\xB3\xB4\xB5' | figlet -f banner -C jis0201

prints nothing (it should print the same as in the first example).

The jis0201.flc file appears to be a Unicode mapping file from the Unicode
Consortium, rather than a figlet control file. Also, the mapping specified
there is to half-width katakana characters (U+FF61 - U+FF9F); whereas it
appears ,from the working contents of uskata.flc, and the contents of
banner.flf, that the banner font expects the normal katakana character
codes (U+30A1 - U+30FE).

Here's the proposed control-file to replace jis0201.flc. Rather than mapping
the first 256 byte values to JIS X 201, it makes use of figlet's ISO 2022
support. So you can use low- and high-value bytes, or you can use SHIFT OUT
and SHIFT IN, or whatever. Also, it maps the katakana code points to Unicode
full-width katakana characters, rather than half-width katakana, which,
while probably incorrect, is what the banner font expects; as far as I know,
there are no other fonts for katakana, other than the katakana.flf in the
international figlet fonts tarball [available upstream]; which doesn't use
Unicode codepoints for the katakana characters, but just maps uppercase
ASCII characters to the katakana.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2011-01-10 17:25:54 -02:00
..
2011-01-10 07:37:04 -02:00
2011-01-10 07:37:04 -02:00
2011-01-10 07:37:04 -02:00
2011-01-10 07:37:04 -02:00
2011-01-10 07:37:04 -02:00
2011-01-10 07:37:04 -02:00
2011-01-10 07:37:04 -02:00
2011-01-10 07:37:04 -02:00
2011-01-10 07:37:04 -02:00
2011-01-10 07:37:04 -02:00
2011-01-10 07:37:04 -02:00
2011-01-10 07:37:04 -02:00
2011-01-10 07:37:04 -02:00
2011-01-10 07:37:04 -02:00
2011-01-10 07:37:04 -02:00
2011-01-10 07:37:04 -02:00
2011-01-10 07:37:04 -02:00
2011-01-10 07:37:04 -02:00
2011-01-10 07:37:04 -02:00
2011-01-10 07:37:04 -02:00
2011-01-10 07:37:04 -02:00
2011-01-10 07:37:04 -02:00
2011-01-10 07:37:04 -02:00
2011-01-10 07:37:04 -02:00
2011-01-10 07:37:04 -02:00
2011-01-10 07:37:04 -02:00
2011-01-10 07:37:04 -02:00
2011-01-10 07:37:04 -02:00
2011-01-10 07:37:04 -02:00
2011-01-10 07:37:04 -02:00
2011-01-10 07:37:04 -02:00
2011-01-10 07:37:04 -02:00
2011-01-10 07:37:04 -02:00
2011-01-10 07:37:04 -02:00
2011-01-10 07:37:04 -02:00
2011-01-10 07:37:04 -02:00
2011-01-10 07:37:04 -02:00
2011-01-10 07:37:04 -02:00
2011-01-10 07:37:04 -02:00
2011-01-10 07:37:04 -02:00
2011-01-10 07:37:04 -02:00
2011-01-10 07:37:04 -02:00
2011-01-10 07:37:04 -02:00
2011-01-10 07:37:04 -02:00
2011-01-10 07:37:04 -02:00
2011-01-10 07:37:04 -02:00
2011-01-10 07:37:04 -02:00
2011-01-10 07:37:04 -02:00
2011-01-10 07:37:04 -02:00
2011-01-10 07:37:04 -02:00
2011-01-10 07:37:04 -02:00
2011-01-10 07:37:04 -02:00
2011-01-10 07:37:04 -02:00
2011-01-10 07:37:04 -02:00
2011-01-10 07:37:04 -02:00
2011-01-10 07:37:04 -02:00