discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Ingo Schwarze <schwarze@usta.de>
To: discuss@mdocml.bsd.lv
Cc: Ted Unangst <tedu@tedunangst.com>,
	"Anthony J. Bentley" <anthony@cathet.us>
Subject: Re: Accents vs. combining accents
Date: Fri, 28 Feb 2014 18:06:01 +0100	[thread overview]
Message-ID: <20140228170601.GB21476@iris.usta.de> (raw)
In-Reply-To: <CAFRrxynppe1pB7_hc=oUGKaOQr+XvhyweBJU0zOH0=63P5gGMQ@mail.gmail.com>

Hi Anthony,

Anthony J. Bentley wrote on Wed, Feb 26, 2014 at 12:51:38AM -0700:

> Mandoc misbehaves a bit when printing accents in UTF-8.

Right, see below for a patch which i intend to commit.

> In summary:
> 
> - Under normal circumstances, \` and \' should print spacing accents
> and not combining accents.

Correct.  The same is true for many other accent escape sequences.

> - Maybe we should consider printing real quotes (U+2018/9) on raw `
> and ' in UTF-8 mode. Maybe worth bringing up on the groff list too.

That would cause similar issues with copy and paste like the ones
just discussed regarding hyphens and dashes.  So at least for
manuals, it would probably have to be disabled right away,
just like manuals output the ASCII character for - and \-.

I tend to agree with Dmitrij Czarkoff that plain ASCII input
in better left as-is, and people should use escape sequences
if they want specific fancy UTF-8 characters (except that in
manuals, they probably shouldn't, it merely harms portability
to ask for fancy characters).

[...]
> In situations with no composite request (I guess?), mandoc should
> print U+0060 and U+00B4 for \` and \' respectively, as groff does.

Correct.  Mandoc doesn't support escape sequences involving
composite characters at all, so mandoc has to use the codes
you cite in all cases.

Yours,
  Ingo

P.S.
I snipped your discussion of texinfo2man, which makes sense to me.


Index: chars.in
===================================================================
RCS file: /cvs/src/usr.bin/mandoc/chars.in,v
retrieving revision 1.20
diff -u -p -r1.20 chars.in
--- chars.in	22 Jan 2014 20:58:35 -0000	1.20
+++ chars.in	28 Feb 2014 16:46:26 -0000
@@ -49,21 +49,21 @@ CHAR("c",			"",		0)
 CHAR("}",			"",		0)
 
 /* Accents. */
-CHAR("a\"",			"\"",		779)
+CHAR("a\"",			"\"",		733)
 CHAR("a-",			"-",		175)
 CHAR("a.",			".",		729)
-CHAR("a^",			"^",		770)
-CHAR("\'",			"\'",		769)
-CHAR("aa",			"\'",		769)
-CHAR("ga",			"`",		768)
-CHAR("`",			"`",		768)
-CHAR("ab",			"`",		774)
-CHAR("ac",			",",		807)
-CHAR("ad",			"\"",		776)
+CHAR("a^",			"^",		94)
+CHAR("\'",			"\'",		180)
+CHAR("aa",			"\'",		180)
+CHAR("ga",			"`",		96)
+CHAR("`",			"`",		96)
+CHAR("ab",			"`",		728)
+CHAR("ac",			",",		184)
+CHAR("ad",			"\"",		168)
 CHAR("ah",			"v",		711)
 CHAR("ao",			"o",		730)
-CHAR("a~",			"~",		771)
-CHAR("ho",			",",		808)
+CHAR("a~",			"~",		126)
+CHAR("ho",			",",		731)
 CHAR("ha",			"^",		94)
 CHAR("ti",			"~",		126)
 
--
 To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv

      reply	other threads:[~2014-02-28 17:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-26  7:51 Anthony J. Bentley
2014-02-28 17:06 ` Ingo Schwarze [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140228170601.GB21476@iris.usta.de \
    --to=schwarze@usta.de \
    --cc=anthony@cathet.us \
    --cc=discuss@mdocml.bsd.lv \
    --cc=tedu@tedunangst.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).