Imported Upstream version 5.10.0.47

Former-commit-id: d0813289fa2d35e1f8ed77530acb4fb1df441bc0
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2018-01-24 17:04:36 +00:00
parent 88ff76fe28
commit e46a49ecf1
5927 changed files with 226314 additions and 129848 deletions

View File

@@ -97,12 +97,11 @@ public class CP28593 : ByteEncoding
return GetBytesImpl(chars, count, null, 0);
}
else
{
return count;
}
}
// Get the number of bytes needed to encode a character buffer.
public override int GetByteCount (String s)
{
@@ -123,7 +122,7 @@ public class CP28593 : ByteEncoding
return s.Length;
}
}
//ToBytes is just an alias for GetBytesImpl, but doesn't return byte count
protected unsafe override void ToBytes(char* chars, int charCount,
byte* bytes, int byteCount)
@@ -133,7 +132,7 @@ public class CP28593 : ByteEncoding
throw new ArgumentNullException("bytes");
GetBytesImpl(chars, charCount, bytes, byteCount);
}
public unsafe override int GetBytesImpl (char* chars, int charCount,
byte* bytes, int byteCount)
{
@@ -144,8 +143,6 @@ public class CP28593 : ByteEncoding
while (charCount > 0)
{
ch = (int)(chars[charIndex]);
charIndex++;
charCount--;
if(ch >= 161) switch(ch)
{
case 0x00A3:
@@ -246,6 +243,8 @@ public class CP28593 : ByteEncoding
else
{
HandleFallback (ref buffer, chars, ref charIndex, ref charCount, bytes, ref byteIndex, ref byteCount);
charIndex++;
charCount--;
continue;
}
}
@@ -256,128 +255,11 @@ public class CP28593 : ByteEncoding
bytes[byteIndex] = (byte)ch;
byteIndex++;
byteCount--;
charIndex++;
charCount--;
}
return byteIndex;
}
/*
protected override void ToBytes(String s, int charIndex, int charCount,
byte[] bytes, int byteIndex)
{
int ch;
while(charCount > 0)
{
ch = (int)(s[charIndex++]);
if(ch >= 161) switch(ch)
{
case 0x00A3:
case 0x00A4:
case 0x00A7:
case 0x00A8:
case 0x00AD:
case 0x00B0:
case 0x00B2:
case 0x00B3:
case 0x00B4:
case 0x00B5:
case 0x00B7:
case 0x00B8:
case 0x00BD:
case 0x00C0:
case 0x00C1:
case 0x00C2:
case 0x00C4:
case 0x00C7:
case 0x00C8:
case 0x00C9:
case 0x00CA:
case 0x00CB:
case 0x00CC:
case 0x00CD:
case 0x00CE:
case 0x00CF:
case 0x00D1:
case 0x00D2:
case 0x00D3:
case 0x00D4:
case 0x00D6:
case 0x00D7:
case 0x00D9:
case 0x00DA:
case 0x00DB:
case 0x00DC:
case 0x00DF:
case 0x00E0:
case 0x00E1:
case 0x00E2:
case 0x00E4:
case 0x00E7:
case 0x00E8:
case 0x00E9:
case 0x00EA:
case 0x00EB:
case 0x00EC:
case 0x00ED:
case 0x00EE:
case 0x00EF:
case 0x00F1:
case 0x00F2:
case 0x00F3:
case 0x00F4:
case 0x00F6:
case 0x00F7:
case 0x00F9:
case 0x00FA:
case 0x00FB:
case 0x00FC:
break;
case 0x0108: ch = 0xC6; break;
case 0x0109: ch = 0xE6; break;
case 0x010A: ch = 0xC5; break;
case 0x010B: ch = 0xE5; break;
case 0x011C: ch = 0xD8; break;
case 0x011D: ch = 0xF8; break;
case 0x011E: ch = 0xAB; break;
case 0x011F: ch = 0xBB; break;
case 0x0120: ch = 0xD5; break;
case 0x0121: ch = 0xF5; break;
case 0x0124: ch = 0xA6; break;
case 0x0125: ch = 0xB6; break;
case 0x0126: ch = 0xA1; break;
case 0x0127: ch = 0xB1; break;
case 0x0130: ch = 0xA9; break;
case 0x0131: ch = 0xB9; break;
case 0x0134: ch = 0xAC; break;
case 0x0135: ch = 0xBC; break;
case 0x015C: ch = 0xDE; break;
case 0x015D: ch = 0xFE; break;
case 0x015E: ch = 0xAA; break;
case 0x015F: ch = 0xBA; break;
case 0x016C: ch = 0xDD; break;
case 0x016D: ch = 0xFD; break;
case 0x017B: ch = 0xAF; break;
case 0x017C: ch = 0xBF; break;
case 0x02D8: ch = 0xA2; break;
case 0x02D9: ch = 0xFF; break;
default:
{
if(ch >= 0xFF01 && ch <= 0xFF5E)
{
ch -= 0xFEE0;
}
else
{
ch = 0x3F;
}
}
break;
}
bytes[byteIndex++] = (byte)ch;
--charCount;
}
}
*/
}; // class CP28593
[Serializable]