Subject: [Tools-discuss] boilerplate BCP14 and UTF8

From: Michael Richardson <[email-masked]>
Date: Wed, 04 Dec 2019 12:47:36 -0500

Kramdown gives me this error in some documents:

/usr/local/rvm/gems/ruby-2.6.5/gems/kramdown-rfc2629-1.2.12/bin/kramdown-rfc2629:333:in
`encode': U+00A0 from UTF-8 to US-ASCII (Encoding::UndefinedConversionError)

when I include {::boilerplate bcp14}

I don't have a BOM in my markdown. I don't think I should.
It feels like the output ought to be in UTF-8, but isn't somehow.

--
]               Never tell me the odds!                 | ipv6 mesh networks [
]   Michael Richardson, Sandelman Software Works        |    IoT architect   [
]     [email-masked]  http://www.sandelman.ca/        |   ruby on rails    [

---

From: Michael Richardson <[email-masked]>
Date: Wed, 04 Dec 2019 12:49:16 -0500

> It feels like the output ought to be in UTF-8, but isn't somehow.

I found:
  coding: us-ascii

in my markdown, and removed it.  Maybe we can make the error more meaningful?
Or maybe the template that is copied in could be US-ASCII only?

--
Michael Richardson <[email-masked]>, Sandelman Software Works
 -= IPv6 IoT consulting =-

---

From: Carsten Bormann <[email-masked]>
Date: Wed, 4 Dec 2019 19:20:39 +0100

On Dec 4, 2019, at 18:49, Michael Richardson <[email-masked]> wrote:
> Signed PGP part

How did that get there?

> in my markdown, and removed it.  Maybe we can make the error more meaningful?

Probably.  Now https://github.com/cabo/kramdown-rfc2629/issues/65

> Or maybe the template that is copied in could be US-ASCII only?

I’ll need to check how to do the NBSP in “BCP 14” in markdown without leaving ASCII encoding.  But maybe the whole idea of allowing “coding: us-ascii” is not so useful now.

Grüße, Carsten

---

From: Michael Richardson <[email-masked]>
Date: Wed, 04 Dec 2019 13:37:08 -0500

> I’ll need to check how to do the NBSP in “BCP 14” in markdown without
    > leaving ASCII encoding.  But maybe the whole idea of allowing “coding:
    > us-ascii” is not so useful now.

Maybe:

if coding == "us-ascii"
  puts "WARNING: all sorts of things break if you insist on XML output being US-ASCII."
  puts "See https://github.com/cabo/kramdown-rfc2629/issues/65"
end