Move some basic macros for working with UTF16 from intl to XPCOM; use them in

some places including the HTML parser.  Part of fix for bug 316394; the CSS
parser changes are still coming.  r=smontagu, r=mrbkap on parser changes, sr=dbaron


git-svn-id: svn://10.0.0.236/trunk@184651 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzbarsky%mit.edu
2005-11-15 18:17:22 +00:00
parent 64d8ac678b
commit 48dbeb8ec0
6 changed files with 79 additions and 45 deletions

View File

@@ -2363,12 +2363,7 @@ static void AppendNCR(nsSubstring& aString, PRInt32 aNCRValue)
}
#endif
if (IS_IN_BMP(aNCRValue))
aString.Append(PRUnichar(aNCRValue));
else {
aString.Append(PRUnichar(H_SURROGATE(aNCRValue)));
aString.Append(PRUnichar(L_SURROGATE(aNCRValue)));
}
AppendUCS4ToUTF16(ENSURE_VALID_CHAR(aNCRValue), aString);
}
/*