bugGNU roff - Bugs: bug #65710, [preconv] require disambiguation...

 
 

bug #65710: [preconv] require disambiguation of U+00A0 on input

Submitter:  G. Branden Robinson <gbranden>
Submitted:  Tue 07 May 2024 11:50:39 AM UTC
   
 
Category:  Utilities Severity:  3 - Normal
Item Group:  Feature change Status:  Need Info
Privacy:  Public Assigned to:  None
Open/Closed:  Open Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 08 May 2024 08:59:11 PM UTC, comment #1: 

original submission:

> an input U+00A0...: is it a fixed-width non-breakable space, or a
> variable-width non-breakable space?  Unicode does not distinguish.


Unicode intentionally provides some latitude to rendering engines to make the best typographical decisions they can.  That is, Unicode is not really a driving factor here; the only Unicode requirement of U+00A0 is that it be nonbreaking, and both "\ " and "\~" meet that requirement.

Since 2003 (commit 48615a44), groff_char(7) has said "the ISO Latin-1 no-break space is mapped to `\~', the stretchable space character."  While this claim was erroneous until bug #58962 addressed it (and remains erroneous with certain fonts, per bug #65693), it has always been the most typographically sound solution.

I think groff should strive to do by default what makes most typographic sense, and (as #58962 argued) there are few if any situations where "\ " is preferable to "\~".

> This is analogous to how we don't know whether a man page
> author means a hyphen or a minus sign when they type `-`.


Weakly analogous:

  • Hyphens and minus signs are different semantically.  The two types of nonbreaking spaces are different only presentationally.
  • Hyphens and minus signs must copy to the clipboard as different characters; both types of nonbreaking spaces will possibly copy as U+00A0, though more probably (and more usefully to the user in most cases) copy as an ordinary space.


> 2.  Add an option instructing preconv which escape sequence to
> transform U+00A0 into.


I don't oppose an option to override the default escape preconv uses, but its current default is sound.  (Still, I would question the need for such an option, since users can always specify either escape directly in the source, and preconv won't touch it.)

Dave <barx>
Group Member
Tue 07 May 2024 11:50:39 AM UTC, original submission:  

Considering bug #65693, I suggest that it may be worth treating an input U+00A0 as ambiguous: is it a fixed-width non-breakable space, or a variable-width non-breakable space?  Unicode does not distinguish.

This is analogous to how we don't know whether a man page author means a hyphen or a minus sign when they type `-`.

In my opinion preconv should either:

1.  Fail and force the user to edit the input to make a real choice, eliminating U+00A0 in the input.

2.  Add an option instructing preconv which escape sequence to transform U+00A0 into.

G. Branden Robinson <gbranden>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by barx (Posted a comment)
  • -email is unavailable- added by gbranden (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code