I'm rendering a PDF using MigraDocCore, when I run my app locally these symbols render correctly:
But when I run it in Azure App Service the symbols are missing:
My default Style is defined as
Style style = Document.Styles["Normal"];
style.Font.Name = "Arial";
style.Font.Color = Colors.Black;
style.ParagraphFormat.SpaceAfter = Unit.FromMillimeter(5);
Why are these symbols not rendering correctly in Azure and how can I fix it?
---- Edit:
I've just noticed as I post this that the one of the m³ is rendering correctly in Azure, while others aren't.
The difference here is that the one's not working are hard coded strings while the one that does work is going through the Localizer.
e.g.
var tf = section.AddTextFrame();
// This works
var str = L("m³");
var para = tf.AddParagraph(str);
// This doesn't work
var para = tf.AddParagraph("m³");
If I check the character code of the hard coded ³
and the one in my localization json they're both char 179.
The only difference I can see here is the json file is UTF-8 without the BOM, while the .cs file is ~~UTF-8 with a BOM~~ Western European. (This is probably going to be the issue).
I've saved the .cs file as UTF-8 without the BOM and will report back...