Html to word unicode not rendering

Hello Team,

i am converting a html document to word/docx using below code. The unicode/Japanese text is not rendering in docx. Can you please help.


string html = @"<html><head><title>Test Page</title></head><body><p>統領副総裁とホワイトハウス副相談役</p></body></html>";
            Document theDoc;
            using (MemoryStream mStrm = new MemoryStream(Encoding.UTF8.GetBytes(html)))
                theDoc = new Document(mStrm);

here is the output i got also attached the word document
çµ±é ˜å‰¯ç·è£ã¨ãƒ›ãƒ¯ã‚¤ãƒˆãƒã‚¦ã‚¹å‰¯ç›¸è«‡å½¹

test word (10.0 KB)
image.png (1.6 KB)

changing encoding to UTF32 fixed that.



It is nice to hear from you that you have solved your issue. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.