Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ CharToUTF8()

static unsafe void System.Xml.XmlUtf8RawTextWriter.CharToUTF8 ( ref char * pSrc,
char * pSrcEnd,
ref byte * pDst )
inlinestaticpackageinherited

Definition at line 1221 of file XmlUtf8RawTextWriter.cs.

1222 {
1223 int num = *pSrc;
1224 if (num <= 127)
1225 {
1226 *pDst = (byte)num;
1227 pDst++;
1228 pSrc++;
1229 }
1230 else if (XmlCharType.IsSurrogate(num))
1231 {
1233 pSrc += 2;
1234 }
1235 else
1236 {
1238 pSrc++;
1239 }
1240 }
static unsafe byte * EncodeMultibyteUTF8(int ch, byte *pDst)
static unsafe byte * EncodeSurrogate(char *pSrc, char *pSrcEnd, byte *pDst)

References System.Xml.Dictionary, System.Xml.XmlUtf8RawTextWriter.EncodeMultibyteUTF8(), System.Xml.XmlUtf8RawTextWriter.EncodeSurrogate(), and System.Xml.XmlCharType.IsSurrogate().

Referenced by System.Xml.HtmlEncodedRawTextWriter.WriteUriAttributeText(), and System.Xml.HtmlUtf8RawTextWriter.WriteUriAttributeText().