projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
silly backporting failure here as well :-(
[mono.git]
/
mcs
/
class
/
I18N
/
West
/
CP10000.cs
diff --git
a/mcs/class/I18N/West/CP10000.cs
b/mcs/class/I18N/West/CP10000.cs
index 3cd1c00b203b164d6b38b3782f449b437da165f2..b5a722724216cc46b0e00475cf3fe12543767bcd 100644
(file)
--- a/
mcs/class/I18N/West/CP10000.cs
+++ b/
mcs/class/I18N/West/CP10000.cs
@@
-28,6
+28,7
@@
namespace I18N.West
{
using System;
{
using System;
+using System.Text;
using I18N.Common;
public class CP10000 : ByteEncoding
using I18N.Common;
public class CP10000 : ByteEncoding
@@
-84,10
+85,15
@@
public class CP10000 : ByteEncoding
'\u00B8', '\u02DD', '\u02DB', '\u02C7',
};
'\u00B8', '\u02DD', '\u02DB', '\u02C7',
};
- protected
override void ToBytes(char[] chars, int charIndex
, int charCount,
- byte
[] bytes, int byteIndex
)
+ protected
unsafe override void ToBytes(char* chars
, int charCount,
+ byte
* bytes, int byteCount
)
{
int ch;
{
int ch;
+ int charIndex = 0;
+ int byteIndex = 0;
+#if NET_2_0
+ EncoderFallbackBuffer buffer = null;
+#endif
while(charCount > 0)
{
ch = (int)(chars[charIndex++]);
while(charCount > 0)
{
ch = (int)(chars[charIndex++]);
@@
-230,15
+236,21
@@
public class CP10000 : ByteEncoding
if(ch >= 0xFF01 && ch <= 0xFF5E)
ch -= 0xFEE0;
else
if(ch >= 0xFF01 && ch <= 0xFF5E)
ch -= 0xFEE0;
else
+#if NET_2_0
+ HandleFallback (ref buffer, chars, ref charIndex, ref charCount, bytes, ref byteIndex, ref byteCount);
+#else
ch = 0x3F;
ch = 0x3F;
+#endif
}
break;
}
bytes[byteIndex++] = (byte)ch;
--charCount;
}
break;
}
bytes[byteIndex++] = (byte)ch;
--charCount;
+ --byteCount;
}
}
}
}
+ /*
protected override void ToBytes(String s, int charIndex, int charCount,
byte[] bytes, int byteIndex)
{
protected override void ToBytes(String s, int charIndex, int charCount,
byte[] bytes, int byteIndex)
{
@@
-393,6
+405,7
@@
public class CP10000 : ByteEncoding
--charCount;
}
}
--charCount;
}
}
+ */
}; // class CP10000
}; // class CP10000