bug-groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #62300] [preconv] does not handle U+00A0 (NBSP) as it should


From: Bjarni Ingi Gislason
Subject: [bug #62300] [preconv] does not handle U+00A0 (NBSP) as it should
Date: Mon, 11 Apr 2022 23:37:18 -0400 (EDT)

Follow-up Comment #1, bug #62300 (project groff):

commit f47b7dd139525bf3b8b4fbe767c3a45816c8445a
Author: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
Date:   Sat Nov 17 15:59:09 2018 +0000

    The character \[u00A0] is not recognized
    
      The input character "no-break space" (' ', 0xA0) is mapped by "groff"
    to '\~' (groff_char(7)), but only the character name '\[char160]' is
    translated in the file "tmac/troffrc".
    
      The "preconv" translates the no-break space to the name '\[u00A0]'.
    
      Example:
    
    .pl 3v
    A\[char161]B\[char160]C
    .br
    .\".tr \[u00A0]\~
    A\[u00A1]B\[u00A0]C
    
      or
    
    echo ' ' | preconv
    
    Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>

diff --git a/tmac/troffrc b/tmac/troffrc
index 1bd4aa8c9..8895a9a01 100644
--- a/tmac/troffrc
+++ b/tmac/troffrc
@@ -33,10 +33,14 @@ troffrc!X100 troffrc!X100-12 troffrc!lj4 troff!lbp
troffrc!html troffrc!pdf
 .
 .\" Test whether we work under EBCDIC and map the no-breakable space
 .\" character accordingly.
-.do ie '\[char97]'a' \
+.do ie '\[char97]'a' \{\
 .      do tr \[char160]\~
-.el \
+.      do tr \[u00A0]\~
+.\}
+.el \{\
 .      do tr \[char65]\~
+.      do tr \[u0041]\~
+.\}
 .
 .\" Set the hyphenation language to 'us'.
 .do hla us



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?62300>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]