Imported Upstream version 4.0.0~alpha1

Former-commit-id: 806294f5ded97629b74c85c09952f2a74fe182d9
This commit is contained in:
Jo Shields
2015-04-07 09:35:12 +01:00
parent 283343f570
commit 3c1f479b9d
22469 changed files with 2931443 additions and 869343 deletions

View File

@@ -140,9 +140,7 @@ public class CP1254 : ByteEncoding
int ch;
int charIndex = 0;
int byteIndex = 0;
#if NET_2_0
EncoderFallbackBuffer buffer = null;
#endif
while (charCount > 0)
{
ch = (int)(chars[charIndex]);

View File

@@ -140,9 +140,7 @@ public class CP1255 : ByteEncoding
int ch;
int charIndex = 0;
int byteIndex = 0;
#if NET_2_0
EncoderFallbackBuffer buffer = null;
#endif
while (charCount > 0)
{
ch = (int)(chars[charIndex]);

View File

@@ -140,9 +140,7 @@ public class CP1256 : ByteEncoding
int ch;
int charIndex = 0;
int byteIndex = 0;
#if NET_2_0
EncoderFallbackBuffer buffer = null;
#endif
while (charCount > 0)
{
ch = (int)(chars[charIndex]);

View File

@@ -140,9 +140,7 @@ public class CP28596 : ByteEncoding
int ch;
int charIndex = 0;
int byteIndex = 0;
#if NET_2_0
EncoderFallbackBuffer buffer = null;
#endif
while (charCount > 0)
{
ch = (int)(chars[charIndex]);

View File

@@ -140,9 +140,7 @@ public class CP28598 : ByteEncoding
int ch;
int charIndex = 0;
int byteIndex = 0;
#if NET_2_0
EncoderFallbackBuffer buffer = null;
#endif
while (charCount > 0)
{
ch = (int)(chars[charIndex]);

View File

@@ -140,9 +140,7 @@ public class CP28599 : ByteEncoding
int ch;
int charIndex = 0;
int byteIndex = 0;
#if NET_2_0
EncoderFallbackBuffer buffer = null;
#endif
while (charCount > 0)
{
ch = (int)(chars[charIndex]);

View File

@@ -140,9 +140,7 @@ public class CP38598 : ByteEncoding
int ch;
int charIndex = 0;
int byteIndex = 0;
#if NET_2_0
EncoderFallbackBuffer buffer = null;
#endif
while (charCount > 0)
{
ch = (int)(chars[charIndex]);

View File

@@ -45,14 +45,10 @@ namespace MonoTests.I18N.MidEast
//Encoding enc = Manager.GetEncoding(codepage);
Encoding enc;
if (fallbackString != null) {
#if NET_2_0
enc = Encoding.GetEncoding(codepage,
new System.Text.EncoderReplacementFallback(fallbackString),
new System.Text.DecoderReplacementFallback("irrelevant")
);
#else
throw new InvalidOperationException("DotNet < 2.0 doesn't support encoder fallback");
#endif
} else {
enc = Encoding.GetEncoding(codepage);
}