{
using System;
+using System.Text;
using I18N.Common;
+[Serializable]
public class CP862 : ByteEncoding
{
public CP862()
'\u207F', '\u00B2', '\u25A0', '\u00A0',
};
- 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 charIndex = 0;
+ int byteIndex = 0;
+#if NET_2_0
+ EncoderFallbackBuffer buffer = null;
+#endif
while(charCount > 0)
{
ch = (int)(chars[charIndex++]);
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;
+#endif
}
break;
}
bytes[byteIndex++] = (byte)ch;
--charCount;
+ --byteCount;
}
}
+ /*
protected override void ToBytes(String s, int charIndex, int charCount,
byte[] bytes, int byteIndex)
{
--charCount;
}
}
+ */
}; // class CP862
+[Serializable]
public class ENCibm862 : CP862
{
public ENCibm862() : base() {}