HyperlinkAddress is not correct when unicode characters are found in the link path

Hello dear Aspose team,

We are facing an issue where Aspose.Note does not return the correct hyperlink address for hyperlinks which contain Unicode characters in their address. For those hyperlinks, it simply returns the hyperlink text as hyperlink address, which is not correct.

We have created a sample project to demonstrate this behavior. Please notice that for all the hyperlinks the hyperlink text is being retrieved correctly except the ones which contain Unicode characters.

https://files.axiomint.com/external/file/4ppre888fb7ba258942afbed826d4825e3f49

If you will have difficulties downloading the project, you can simply download the sample file (the forum does not allow attaching files of .one format) and run the following code

public static void Main(string[] args)
{
    string filePath = @"Test File\OneNoteTest.one";
    using (FileStream fileStream = new FileStream(filePath, FileMode.Open))
    {
        Document doc = new Document(fileStream);
        foreach (var page in doc)
        {
            IList<RichText> richTexts = page.GetChildNodes<RichText>();
            foreach (RichText richText in richTexts)
            {
                foreach (TextRun textRun in richText.TextRuns)
                {
                    var textStyle = textRun.Style;
                    if (textStyle.IsHyperlink && !string.IsNullOrWhiteSpace(textStyle.HyperlinkAddress))
                    {
                        string linkPath = textStyle.HyperlinkAddress;
                        string linkText = textRun.Text;

                        Console.WriteLine($"Link Text: {linkText}");
                        Console.WriteLine($"Link Path: {linkPath}");
                        Console.WriteLine("-----------------------");
                        Console.WriteLine();
                    }
                }
            }
        }
    }

    Console.ReadKey();
}

Sample file:

Link 1: OneNoteTest.one
Link 2: OneNoteTest.one - Google Drive

@vahem,

Thanks for the sample document and details.

After an initial testing, I was able to reproduce the issue as you mentioned by using your sample document. I found HyperlinkAddress is not correctly retrieved when unicode characters are found in the link path of the document.

We require thorough evaluation of the issue. We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): NOTENET-5832

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.