Closed OliverAut closed 2 years ago
Thank you for the bug report.
The icon value is escaped as \ue901
which is not recognised from the Lua side. This fix is not trivial so I cannot give you a date this will be fixed.
For me (tree.go#444):
for key, value := range resolvedAttributes {
fmt.Fprintf(out, "[%q] = %q ,", key, value)
}
value
needs a proper escape.
A workaround using files as a replacement will be difficult to implement, since the data to be rendered (from the database) will only contain the symbol value... Therefore I would be very grateful for any working solution.
Maybe this information will help
https://stackoverflow.com/questions/7983574/how-to-write-a-unicode-symbol-in-lua
Lua does not look inside strings. So, you can just write
mychar = "►"
(added in 2015)
Lua 5.3 introduced support for UTF-8 escape sequences:
The UTF-8 encoding of a Unicode character can be inserted in a literal string with the escape sequence \u{XXX} (note the mandatory enclosing brackets), where XXX is a sequence of one or more hexadecimal digits representing the character code point.
Testing with version 4.7.3 2022-01-21 works only if the icon is used directly as text within the layout.xml.
<Paragraph fontfamily="icomoon" textformat="headline">
<Value select="''"/>
</Paragraph>
But the same error occurs as reported above if the icon is contained directly in the data.xml:
<h3 icon="">AnyText</h3>
<Paragraph fontfamily="icomoon" textformat="headline">
<Value select="@icon"/>
</Paragraph>
Trying to use an escaped value does not work either:
<h3 icon="\u{eb0d}">AnyText</h3>
Would it be possible to send me the layout/data and the icon font via (private) email?
Sorry for the unnecessary reopening - the bug has been already fixed with 4.7.3. There was another problem within my local installation / configuration. Now it works fine. I appreciate your immediate support.
I use an attribute in the data.xml containing a symbol of an icomoon font that should produce an icon in the output:
<h3 icon="">AnyText</h3>
When compiling the following error occurs:
Using the symbol directly as text in the layout.xml produces the same error.