lowdown
lowdown copied to clipboard
Incorrect percent encoding of unicode characters
When generating a manpage and a link contains a unicode characters the percent encoding sequences are invalid:
Running lowdown -s -T man test.md with this test.md
(The ‑ here is not an ascii character)
title: Test
[Text](./unicode‑on)
results in
.\" -*- mode: troff; coding: utf-8 -*-
.TH "Test" "7" ""
.PP
.UR ./unicode%FFFFFFE2%FFFFFF80%FFFFFF91hyphpon
Text
.UE
I noticed that some builds on other processor architectures have the correct output of %E2%80%91. Maybe there is some out of bounds memory access?
Excellent point. This has also revealed a bad encoding when encountering spaces in URLs in -tman and -tms. Thank you! I'll have this fixed in the next release.