[Bug]: frame5() not handling UTF-8 emojis in certain situations which work in chat and frame
Baaaaaz opened this issue · comments
Describe the Bug
UTF-8 emojis do not display correctly in frame5 in certain situations when they do in chat and frame.
Specifically I was trying to convert some markdown which contain emojis to html, and the converted emoji is displaying as ������. Further investigation shows frame5 does not display UTF-8 emojis in other situations either.
To Reproduce
- Create a new macro
- Paste and run the MT script below
<table>
<tr><th>Case</th> <th>Value</th> <th>markdownToHtml</th></tr>
<tr><td>0. raw</td> <td>🔒</td> <td></td></tr>
<tr><td>1. quoted</td> <td>"🔒"</td> <td>[r: markdownToHtml("🔒")]</td></tr>
<tr><td>2. entity code</td> <td>🔒</td> <td>[r: markdownToHtml("🔒")]</td></tr>
<tr><td>3. quoted variable</td> <td>[r: key = "🔒"]</td> <td>[r: markdownToHtml(key)]</td></tr>
<tr><td>4. entity code variable</td> <td>[r: htmlKey = "🔒"]</td> <td>[r: markdownToHtml(htmlKey)]</td></tr>
</table>
[frame("FRAME"): {
<table>
<tr><th>Case</th> <th>Value</th> <th>markdownToHtml</th></tr>
<tr><td>0. raw</td> <td>🔒</td> <td></td></tr>
<tr><td>1. quoted</td> <td>"🔒"</td> <td>[r: markdownToHtml("🔒")]</td></tr>
<tr><td>2. entity code</td> <td>🔒</td> <td>[r: markdownToHtml("🔒")]</td></tr>
<tr><td>3. quoted variable</td> <td>[r: key = "🔒"]</td> <td>[r: markdownToHtml(key)]</td></tr>
<tr><td>4. entity code variable</td> <td>[r: htmlKey = "🔒"]</td> <td>[r: markdownToHtml(htmlKey)]</td></tr>
</table>
}]
[frame5("FRAME5"): {
<table>
<tr><th>Case</th> <th>Value</th> <th>markdownToHtml</th></tr>
<tr><td>0. raw</td> <td>🔒</td> <td></td></tr>
<tr><td>1. quoted</td> <td>"🔒"</td> <td>[r: markdownToHtml("🔒")]</td></tr>
<tr><td>2. entity code</td> <td>🔒</td> <td>[r: markdownToHtml("🔒")]</td></tr>
<tr><td>3. quoted variable</td> <td>[r: key = "🔒"]</td> <td>[r: markdownToHtml(key)]</td></tr>
<tr><td>4. entity code variable</td> <td>[r: htmlKey = "🔒"]</td> <td>[r: markdownToHtml(htmlKey)]</td></tr>
</table>
}]
- Observe different outputs to chat/frame vs frame5 where ������ is output to frame5 in certain situations for both
🔒
and🔒
Expected Behaviour
Consistent and correct display of UTF-8 emojis across chat/frame/frame5.
Screenshots
MapTool Info
1.14.3
Desktop
Windows 11
Additional Context
chat log shows 🔒
and 🔒
is converted to ��
Also affects token notes/gm notes depending which MIME type and which tab is selected, but seems to display okay in the notes pop up, but not sure if this is related: