Closed sandrotosi closed 5 years ago
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: https://github.com/leforestier/yattag/issues/45
By the way, you always have the option to insert text without escaping, that's what the asis
method is for.
if i want to add a unicode escape sequence, say an emoji, i'd need to enter a string like
👍
bit yattagtext()
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!