On Fri Nov 4 07:10:33 2022 +0000, David Kahurani wrote:
I'm not sure what you mean by this part. I mean, yes, WriteString/WriteChars/WriteRawChars all reject surrogate characters, whether passed in as one or as a pair. They all do so with WR_E_INVALIDSURROGATEPAIR so yes something needs to be done there. WriteChars(0xab, 1) will fail because WriteChars expects a string and so do the other relatives. I fail to understand the part about hex escaping because it doesn't look to me like these functions ever get to see the hex passed in the user, they only see Unicode characters...
You can only pass surrogates there as a pair of consecutive characters. What do you mean by 0xab example? I don't get it. Regarding escaping, I mean you're using `&#x%X;` char entity just in this one method, but what happens if you do WriteChars(0x100, 1)? Shouldn't it be using same approach there?