tech@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Kristaps Dzonsons <kristaps@bsd.lv>
To: Jason McIntyre <jmc@kerhand.co.uk>
Cc: "tech@mdocml.bsd.lv" <tech@mdocml.bsd.lv>
Subject: Re: roff_getstr() and input characters
Date: Wed, 07 Jul 2010 10:49:42 +0200	[thread overview]
Message-ID: <4C343FA6.6090807@bsd.lv> (raw)
In-Reply-To: <20100706231643.GC32413@bramka.kerhand.co.uk>

>> The reason I want to air it with you (I know it works: I've tested it 
>> across all manuals) is because it also removes the check for isprint(), 
>> using strcspn() instead.  As you can see, the rej filter is only for 
>> '\b', which we must prohibit else we boff output encoding; '\t' for 
>> non-literals (warning); and '\\' for the specials check.
>>
>> I argue for lifting the ASCII-constraint because (1) there's nothing in 
>> mdoc/groff/etc that disallows non-ASCII (e.g., Latin-1) characters and 
>> (2) it makes the code much cleaner.
>>
>> Thoughts?
>>
> 
> i don;t really know what you mean, to be honest. you'll have to dumb
> down your question a bit, i'm afraid...

Jason, right now, mandoc spits out a warning for any non-printable ASCII 
character.

This patch lifts this restriction, instead warning only about tabs and 
the "backspace" character.

We'd spoken about this before, but seeing it in action, I'm no longer 
sure.  The killer points are that -Tps will throw away all non-ASCII 
characters as it can't calculate their glyph widths, and -Thtml 
stipulates UTF-8 encoding, so anything but UTF-8 input will be gobbledygock.

In effect, once one uses a non-ASCII encoding, the rendered output will 
be irregular across output modes and, more importantly, user environment 
(terminals, etc.).  This is, in my opinion, a Bad Thing (tm).

Thoughts?

Kristaps
--
 To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv

      parent reply	other threads:[~2010-07-07  8:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-06 23:08 Kristaps Dzonsons
     [not found] ` <20100706231643.GC32413@bramka.kerhand.co.uk>
2010-07-07  8:49   ` Kristaps Dzonsons [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=4C343FA6.6090807@bsd.lv \
    --to=kristaps@bsd.lv \
    --cc=jmc@kerhand.co.uk \
    --cc=tech@mdocml.bsd.lv \
    /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).