Återge Unicode-tilläggstecken i utdata PDF av Aspose.Cells
Contents
[
Hide
]
Normala Unicode-tecken är 2-byte långa medan Unicode-tilläggstecken är 4-byte långa. Aspose.Cells stöder nu rendering av dessa 4-byte Unicode-tecken.
I Unicode Character Standard är tilläggstecken de tecken som tilldelas kodpunkter från U+10000 till U+10FFFF. Med andra ord är dessa Unicode-tecken större än U+FFFF.
- I UTF-8 är dessa tecken var och en 4 byte långa.
- I UTF-16 kräver dessa tecken 2 surrogat (16-bitars enheter).
Återge Unicode-tilläggstecken i utdata PDF av Aspose.Cells
Följande skärmdump visar hur Aspose.Cells renderadesource excel-fil in iutgång PDF. Som du kan se har alla tre tilläggstecken i Unicode renderats på exakt samma sätt som Microsoft Excel.
Exempelkod
Du kan använda den här exempelkoden för att konverterasource excel-fil in iutgång 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"); |