cBra wrote:
Any chance to "hack" my way around it?
I don't know how much is required for that.
Look at this code:
Code:
const string strA = "\u0081";
const string strB = "\U0001f512";
int lenA = strA.Length;
int lenB = strB.Length;
lenA will be 1 and lenB will be 2. Oops.
These surrogate pairs are a problem for this forum, they are a problem for PDFsharp, they are a problem for C#/.NET or whatever.
I don't know how many changes are required in PDFsharp, but you won't get away with changing just two or three lines. The problem starts earlier as the normal .NET string functions won't handle those surrogate pairs as one character.