Bug 246656 - Unicode asterisks in ctime(3) may not render correctly
Summary: Unicode asterisks in ctime(3) may not render correctly
Status: Closed FIXED
Alias: None
Product: Documentation
Classification: Unclassified
Component: Manual Pages (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-bugs mailing list
Depends on:
Reported: 2020-05-22 09:24 UTC by Alexey Dokuchaev
Modified: 2020-05-22 15:30 UTC (History)
2 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Dokuchaev freebsd_committer 2020-05-22 09:24:00 UTC
When tm structure is described in the ctime(3), it's supposed to be rendered as C code, with asterisks for char pointer (tm_zone) and comments (/* ... */).  However, they may not be displayed correctly, depending if the user's font has the glyph for U+2217 (∗) ASTERISK OPERATOR (hex e2 88 97).  For example, Luxi, DroidSans, DejaVuSans monospaced fonts have it, but e.g. Consolas does not (it renders nothing).  With traditional "fixed" font, dotted square is drawn.  On the FreeBSD virtual console with default settings, a square is drawn.

Would it be possible to use the simple ASCII asterisks instead, like everywhere else in that page?  As I read in the commit history of this file, although it is under contrib, it has diverged sufficiently from upstream (including a full whitespace commit and large portions rewritten), so perhaps we can also replace these Unicode asterisks with ASCII ones so it renders correctly everywhere.
Comment 1 Conrad Meyer freebsd_committer 2020-05-22 15:23:47 UTC
It also seems odd to me that mdoc is rendering '\(**' as unicode asterisks at all.  (Well, I am surprised Unicode has a 2nd asterisk character as well; it seems useless.)
Comment 2 Conrad Meyer freebsd_committer 2020-05-22 15:27:18 UTC
Hmm, roff(7):

   Special Characters
     Special characters are used to encode special glyphs ...
     Sequences begin with the escape character ‘\’ followed by
     either an open-parenthesis ‘(’ for two-character sequences...

           \(em    Two-letter em dash escape.
     \(cc    Special Characters with two-letter names, see mandoc_char(7).

I guess that explains \(**.

           Input            Rendered    Description
           \(**             ∗           asterisk

Ok, so \(** is just wrong here.  C comments are not some mathematical formula.
Comment 3 commit-hook freebsd_committer 2020-05-22 15:30:51 UTC
A commit references this bug:

Author: cem
Date: Fri May 22 15:30:14 UTC 2020
New revision: 361385
URL: https://svnweb.freebsd.org/changeset/base/361385

  ctime.3: Use ASCII asterisks for C, not special unicode math glyphs

  PR:		246656
  Reported by:	danfe