support Unicode escape sequence in text()
sandrotosi opened this issue · 2 comments
sandrotosi commented
if i want to add a unicode escape sequence, say an emoji, i'd need to enter a string like 👍
bit yattag text()
will escape it to &#x1F44D
which renders the verbatim string 👍
instead of the thumbs-up emoji.
it would be great if we could have an option to not escape strings and/or any other way you see fit to support unicode sequences.
thanks!
leforestier commented
Hi,
if you declare the document as being utf-8 encoded, you can do this:
text('♬ Ob-La-Di, Ob-La-Da ♬')
or in case your code editor doesn't display utf-8 characters:
text('\u266C Ob-La-Di, Ob-La-Da \u266C')
You can see a more thorough reply I gave to the same question here: #45
leforestier commented
By the way, you always have the option to insert text without escaping, that's what the asis
method is for.