From 5e0e65fbd25d66b3479bdd089f840bb078f27d13 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Sun, 10 Nov 2013 21:34:04 +0000 Subject: Support the alternative syntax \C'uXXXX' for Unicode characters. It is already documented in the Heirloom troff manual, and groff handles it as well. Bug reported by Bjarni Ingi Gislason on . Well, admittedly, that bug was reported against groff, but mandoc was even more broken than groff with respect to this syntax... --- mandoc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'mandoc.c') diff --git a/mandoc.c b/mandoc.c index 963b5b49..2936ef93 100644 --- a/mandoc.c +++ b/mandoc.c @@ -1,4 +1,4 @@ -/* $Id: mandoc.c,v 1.69 2013/10/05 20:30:05 schwarze Exp $ */ +/* $Id: mandoc.c,v 1.70 2013/11/10 21:34:04 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2011, 2012, 2013 Ingo Schwarze @@ -93,8 +93,11 @@ mandoc_escape(const char const **end, const char const **start, int *sz) case ('C'): if ('\'' != **start) return(ESCAPE_ERROR); - gly = ESCAPE_SPECIAL; *start = ++*end; + if ('u' == (*start)[0] && '\'' != (*start)[1]) + gly = ESCAPE_UNICODE; + else + gly = ESCAPE_SPECIAL; term = '\''; break; -- cgit v1.2.3-56-ge451