Control: reassign -1 src:manpages-l10n
Control: clone -1 -2
Control: reassign -2 manpages
On Thu, Nov 08, 2012 at 12:37:39PM -0400, David Prévot wrote:
> The last table (decimal) rendering of ascii(7) is weird: the 3 and 6
> lines not aligned correctly:
>
> v v
> 3: # 3 C S c s 3: ! + 5 ? I S ] g q {
> 4: $ 4 D T d t 4: " , 6 @ J T ^ h r |
> 5: % 5 E U e u 5: # - 7 A K U _ i s }
> 6: & 6 F V f v 6: $ . 8 B L V ` j t ~
> ^
> instead of:
>
> 3: # 3 C S c s 3: ! + 5 ? I S ] g q {
> 4: $ 4 D T d t 4: " , 6 @ J T ^ h r |
> 5: % 5 E U e u 5: # - 7 A K U _ i s }
> 6: & 6 F V f v 6: $ . 8 B L V ` j t ~
>
> I can reproduce it on Wheezy and Sid for the French (from manpages-fr)
> and German (from manpages-de) translations of ascii(7). The layout is
> also broken when displaying it from its full path
> (/usr/share/man/fr/man7/ascii.7.gz), but it displays fine after copying
> the page to another place (e.g. to /tmp). Please find attach the diff
> between the two debug output in case you notice something interesting
> (I'd bet on the page_encoding, but am not aware of man internals).
Only nine years later, I finally got round to investigating this. (I
think I'd tried to look before but been stumped.) Sorry for the long
delay!
When you display a page from its normal locale-specific directory, man
automatically loads the corresponding set of locale macros provided by
groff. In this case (and for several other languages), that includes:
.ss 12 0
That changes the amount of space inserted after end-of-sentence
characters, which by default are '!', '?', and '.'. As it happens,
those are exactly the characters after which the table rendering has
gone wrong above.
I think the following patch is probably the best approach: it puts a
zero-width character after characters that would otherwise be
misinterpreted as an end-of-sentence character, which is groff's
documented way to prevent misinterpretation of those characters. It's
possible that some other approach would work as well, but this is simple
enough. I hope it's clear how to apply this to the corresponding tables
in other languages.
I've reassigned the primary bug here to src:manpages-l10n (covering
manpages-fr, manpages-de, etc.) since this typically goes wrong in
translation, but I think it would be a good idea to do the same thing in
the base ascii(7) page in manpages as a defensive measure against
translators not being aware of this subtle detail, so I've reassigned a
clone of this bug to manpages as well.
--- ascii.7.orig
+++ ascii.7
@@ -141,10 +141,10 @@
0: 0 @ P \` p 0: ( 2 < F P Z d n x
1: ! 1 A Q a q 1: ) 3 = G Q [ e o y
2: " 2 B R b r 2: * 4 > H R \e f p z
-3: # 3 C S c s 3: ! + 5 ? I S ] g q {
+3: # 3 C S c s 3: !\& + 5 ?\& I S ] g q {
4: $ 4 D T d t 4: " , 6 @ J T \(ha h r |
5: % 5 E U e u 5: # \- 7 A K U _ i s }
-6: & 6 F V f v 6: $ . 8 B L V \` j t \(ti
+6: & 6 F V f v 6: $ .\& 8 B L V \` j t \(ti
7: \(aq 7 G W g w 7: % / 9 C M W a k u DEL
8: ( 8 H X h x 8: & 0 : D N X b l v
9: ) 9 I Y i y 9: \(aq 1 ; E O Y c m w
Let me know if you have any other questions about this, and I'll try to
reply in slightly less than nine years this time.
--
Colin Watson (he/him) [[email protected]]