We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Swedish characters

Got a problem with swedish characters.
I want this document to show the swedish charachters correctly:
In this code im just adding a cell and write “MORRUMSÅN” to a document.
But the Å letter doesnt show correctly… im missing the top of the letter.
I searched but cant find any way to fix this.
Cant you please help me with this issue?

CODE:

Aspose.Words.Document doc = new Aspose.Words.Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.StartTable();
builder.InsertCell();
builder.CellFormat.Width = 306;
builder.CellFormat.Borders.ClearFormatting();
builder.CellFormat.Shading.BackgroundPatternColor = Color.White;
builder.Font.Name = "Arial";
builder.Font.Bold = true;
builder.Font.Size = 9;
builder.ParagraphFormat.Alignment = ParagraphAlignment.Left;
builder.Write("MÖRRUMSÅN");
builder.EndRow();
builder.EndTable();
doc.Save("example.doc", SaveFormat.Doc, (OpenInBrowser ? SaveType.OpenInBrowser : SaveType.OpenInWord), this.Response);

Hi
Thanks for your inquiry. All characters are displayed correctly. But it seems that Arial bold displays “Ö” and “Å” not very well. You can increase size to see this.
“Times New Roman” font displays these characters much better. Try using the following code:

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.Font.Name = "Times New Roman";
builder.Font.Bold = false;
builder.Font.Size = 20;
builder.ParagraphFormat.Alignment = ParagraphAlignment.Left;
builder.Write("MÖRRUMSÅN");
doc.Save(@"Test106\out.doc");

Best regards.

Yeah i´ve noticed that “Times” works ok.
So you are saying that there is no way to use Arial with the Å and Ö?

Hi
Of course you can use “Arial” font. I just said that “Times New Roman” looks better in your case.
You can compare these fonts using the following code:

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.Font.Bold = false;
builder.Font.Size = 20;
builder.Font.Name = "Arial";
builder.Writeln("MÖRRUMSÅN");
builder.Font.Name = "Times New Roman";
builder.Writeln("MÖRRUMSÅN");
doc.Save(@"Test106\out.doc");

Best regards.