Render Unicode Supplementary characters in output PDF by Aspose.Cells
Contents
[
Hide
]
Normal Unicode characters are 2-bytes long while Unicode Supplementary characters are 4-bytes long. Aspose.Cells now supports rendering of these 4-bytes Unicode characters.
In the Unicode Character Standard, Supplementary Characters are the characters assigned code points from U+10000 to U+10FFFF. In other words, these are the Unicode characters greater than U+FFFF.
- In UTF-8 these characters are each 4 bytes long.
- In UTF-16 these characters require 2 surrogates (16-bit units).
Render Unicode Supplementary characters in output PDF by Aspose.Cells
The following screenshot shows how Aspose.Cells rendered the source excel file into the output PDF. As you can see all three Unicode Supplementary characters have been rendered exactly same as done by Microsoft Excel.
Sample Code
You can use this sample code to convert source excel file into output PDF.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET | |
// The path to the documents directory. | |
string dataDir = RunExamples.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | |
// Load your source excel file containing Unicode Supplementary characters | |
Workbook wb = new Workbook(dataDir + "unicode-supplementary-characters.xlsx"); | |
// Save the workbook | |
wb.Save(dataDir + "RenderUnicodeInOutput_out.pdf"); |