I am trying to output a unicode character "²" inside of a sapui5-dialog to create squared-meter but it does not work. It only shows "²" instead of the "²". I tried using "²", "²" and "&SUP2" to show the unicode character but I could not get it to work. Is this a bug or did I do something wrong?
What I thought what was weird was that in a xml-fragment "²" is working but the other two unicodes for "²" did not work. Why is that?
I know that a semi-colon is missing after the "²" and the others but otherwise it would show a "²" in the post and you wouldn't be able to tell them apart.
This is what my dialog looks like:
Here some of my code for the creation of the dialog. It is called when a button is pressed.
let sUnicodeChar = "²";
let oDialog = new sap.m.Dialog({
title: "Report",
content: [
new sap.m.HBox({
justifyContent: "SpaceBetween",
items: [
new sap.m.VBox({
items: [new sap.m.Text({text: "m" + sUnicodeChar}]
})
]
})
]
});
oDialog.open();
Since most IDE's and browsers are unicode compatible these days it is possible to not use the unicode (#&...) and instead just enter "²".