diff --git a/doc/quickbook.qbk b/doc/quickbook.qbk index 8dd21b7..6849777 100644 --- a/doc/quickbook.qbk +++ b/doc/quickbook.qbk @@ -634,7 +634,8 @@ from the output. [endsect] [section Unicode escape] -You can enter any 32-bit unicode character by using `\u` followed by its 4 digit +You can enter any 16-bit unicode character by using `\u` followed by its 4 digit +hexadecimal code, or a 32-bit character by using `\U` followed by an 8 digit hexadecimal code. eg. [pre''' @@ -2134,8 +2135,8 @@ boostbook standalone : my_doc : - boost.image.src=images/my_project_logo.png - boost.image.alt="\\"My Project\\"" + boost.image.src\=images/my_project_logo.png + boost.image.alt\="\\"My Project\\"" boost.image.w=100 boost.image.h=50 nav.layout=none diff --git a/phrase.hpp b/phrase.hpp index 41f402a..f9d0066 100644 --- a/phrase.hpp +++ b/phrase.hpp @@ -275,10 +275,10 @@ namespace quickbook str_p("\\n") [actions.break_] | "\\ " // ignore an escaped char | '\\' >> punct_p [actions.raw_char] - | "\\u">> repeat_p(4) - [ - chset<>("0-9a-fA-F") - ] [actions.escape_unicode] + | "\\u" >> repeat_p(4) [chset<>("0-9a-fA-F")] + [actions.escape_unicode] + | "\\U" >> repeat_p(8) [chset<>("0-9a-fA-F")] + [actions.escape_unicode] | ( ("'''" >> !eol) [actions.escape_pre] >> *(anychar_p - "'''") [actions.raw_char] diff --git a/test/unicode-escape.gold b/test/unicode-escape.gold index 8c2bd69..e2f8b12 100644 --- a/test/unicode-escape.gold +++ b/test/unicode-escape.gold @@ -82,4 +82,21 @@ Ωω Omega + + In the unlikely event that you've got a Mahjong font: + + + + 🀀 East Wind + + + 🀁 South Wind + + + 🀂 West Wind + + + 🀃 North Wind + + diff --git a/test/unicode-escape.quickbook b/test/unicode-escape.quickbook index e8a1349..becdef6 100644 --- a/test/unicode-escape.quickbook +++ b/test/unicode-escape.quickbook @@ -27,4 +27,11 @@ * \u03A6\u03C6 Phi * \u03A7\u03C7 Chi * \u03A8\u03C8 Psi -* \u03A9\u03C9 Omega \ No newline at end of file +* \u03A9\u03C9 Omega + +In the unlikely event that you've got a Mahjong font: + +* \U0001F000 East Wind +* \U0001F001 South Wind +* \U0001F002 West Wind +* \U0001F003 North Wind \ No newline at end of file