1 |
|
Sun Sep 14 16:24:00 BST 2003 Colin Watson <cjwatson@debian.org> |
2 |
|
|
3 |
|
Make locales like ru_RU.UTF-8 that need the ascii8 device but UTF-8 |
4 |
|
output work. This involves a good deal of restructuring. |
5 |
|
|
6 |
|
* src/encodings.c (directory_table): Remove a completed TODO |
7 |
|
comment. |
8 |
|
(directory_table, charset_table, device_table): Name array element |
9 |
|
struct types in order to abbreviate code later. |
10 |
|
(device_table): Split less_charset members out into a new table, |
11 |
|
less_charset_table. They really depend on the locale charset, but |
12 |
|
aren't quite appropriate for charset_table. Use "iso8859" rather |
13 |
|
than "latin1", and add KOI8-R. |
14 |
|
(device_table): Add output_encoding member, which is almost the |
15 |
|
inverse of charset_table but slightly different for ascii8. |
16 |
|
(compatible_encodings): New function to figure out if a source |
17 |
|
encoding and a roff encoding are compatible. |
18 |
|
(get_default_device): Take new source_encoding argument so that we |
19 |
|
can make ru_RU.UTF-8 use the ascii8 device and an iconv pipe |
20 |
|
rather than utf8 directly. Drop through to the fallback default |
21 |
|
device if none of the predefined entries in charset_table are |
22 |
|
compatible when considering the source encoding. |
23 |
|
(get_roff_encoding): Split LESSCHARSET handling out into a new |
24 |
|
function ... |
25 |
|
(get_less_charset): ... here. The caller is expected to set |
26 |
|
environment variables rather than having it done by the library. |
27 |
|
(get_output_encoding): New function, returning the output encoding |
28 |
|
produced by a device. |
29 |
|
* src/encodings.h (get_default_device): Update prototype. |
30 |
|
(get_output_encoding, get_less_charset): Add prototypes. |
31 |
|
* src/man.c (make_roff_command): Update calls to encoding library |
32 |
|
for these changes. |
33 |
|
|
34 |
Sun Sep 7 23:10:01 BST 2003 Colin Watson <cjwatson@debian.org> |
Sun Sep 7 23:10:01 BST 2003 Colin Watson <cjwatson@debian.org> |
35 |
|
|
36 |
Fix decision about whether a given encoding is safe to save as a cat |
Fix decision about whether a given encoding is safe to save as a cat |