Make Bidi symmetric swapping handle characters outside BMP. Bug 122800, r=mkaply, sr=darin
git-svn-id: svn://10.0.0.236/trunk@228964 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -100,8 +100,8 @@ foreach $block (0 .. 0xff) {
|
||||
}
|
||||
|
||||
# Generate conversion method
|
||||
print OUT "\nstatic PRUnichar Mirrored(PRUnichar u)\n{\n";
|
||||
print OUT " switch (u & 0xFF00) {\n";
|
||||
print OUT "\nstatic PRUint32 Mirrored(PRUint32 u)\n{\n";
|
||||
print OUT " switch (u & 0xFFFFFF00) {\n";
|
||||
print OUT " // XOR the character with the bitmap in the conversion table to give the symmetric equivalent\n";
|
||||
foreach $block (0 .. 0xff) {
|
||||
if (1==@isblock[$block]) {
|
||||
|
||||
@@ -127,9 +127,9 @@ const static PRUint8 symmtable_30[256] = {
|
||||
/* F_ */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
};
|
||||
|
||||
static PRUnichar Mirrored(PRUnichar u)
|
||||
static PRUint32 Mirrored(PRUint32 u)
|
||||
{
|
||||
switch (u & 0xFF00) {
|
||||
switch (u & 0xFFFFFF00) {
|
||||
// XOR the character with the bitmap in the conversion table to give the symmetric equivalent
|
||||
case 0:
|
||||
u ^= symmtable_00[u & 0xff];
|
||||
|
||||
Reference in New Issue
Block a user