You've already forked linux-packaging-mono
Imported Upstream version 5.10.0.47
Former-commit-id: d0813289fa2d35e1f8ed77530acb4fb1df441bc0
This commit is contained in:
parent
88ff76fe28
commit
e46a49ecf1
@@ -97,12 +97,11 @@ public class CP28599 : 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 CP28599 : 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 CP28599 : 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 CP28599 : ByteEncoding
|
||||
while (charCount > 0)
|
||||
{
|
||||
ch = (int)(chars[charIndex]);
|
||||
charIndex++;
|
||||
charCount--;
|
||||
if(ch >= 208) switch(ch)
|
||||
{
|
||||
case 0x00D1:
|
||||
@@ -207,6 +204,8 @@ public class CP28599 : ByteEncoding
|
||||
else
|
||||
{
|
||||
HandleFallback (ref buffer, chars, ref charIndex, ref charCount, bytes, ref byteIndex, ref byteCount);
|
||||
charIndex++;
|
||||
charCount--;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -217,89 +216,11 @@ public class CP28599 : 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 >= 208) switch(ch)
|
||||
{
|
||||
case 0x00D1:
|
||||
case 0x00D2:
|
||||
case 0x00D3:
|
||||
case 0x00D4:
|
||||
case 0x00D5:
|
||||
case 0x00D6:
|
||||
case 0x00D7:
|
||||
case 0x00D8:
|
||||
case 0x00D9:
|
||||
case 0x00DA:
|
||||
case 0x00DB:
|
||||
case 0x00DC:
|
||||
case 0x00DF:
|
||||
case 0x00E0:
|
||||
case 0x00E1:
|
||||
case 0x00E2:
|
||||
case 0x00E3:
|
||||
case 0x00E4:
|
||||
case 0x00E5:
|
||||
case 0x00E6:
|
||||
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 0x00F5:
|
||||
case 0x00F6:
|
||||
case 0x00F7:
|
||||
case 0x00F8:
|
||||
case 0x00F9:
|
||||
case 0x00FA:
|
||||
case 0x00FB:
|
||||
case 0x00FC:
|
||||
case 0x00FF:
|
||||
break;
|
||||
case 0x011E: ch = 0xD0; break;
|
||||
case 0x011F: ch = 0xF0; break;
|
||||
case 0x0130: ch = 0xDD; break;
|
||||
case 0x0131: ch = 0xFD; break;
|
||||
case 0x015E: ch = 0xDE; break;
|
||||
case 0x015F: ch = 0xFE; break;
|
||||
case 0x203E: ch = 0xAF; break;
|
||||
default:
|
||||
{
|
||||
if(ch >= 0xFF01 && ch <= 0xFF5E)
|
||||
{
|
||||
ch -= 0xFEE0;
|
||||
}
|
||||
else
|
||||
{
|
||||
ch = 0x3F;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
bytes[byteIndex++] = (byte)ch;
|
||||
--charCount;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
}; // class CP28599
|
||||
|
||||
[Serializable]
|
||||
|
||||
Reference in New Issue
Block a user