示例#1
0
 public void CustomDecoderFallback()
 {
     byte[] encoded = { 0x80, 0xA1, 0x83 };
     encoder = new EucJpEncoding(
         new DecoderReplacementFallback("?!"),
         new EncoderExceptionFallback());
     Assert.AreEqual("?!?!?!", encoder.GetString(encoded));
 }
示例#2
0
 public void DefaultDecoderFallbackThrowsException()
 {
     byte[] encoded = { 0x80, 0xA1, 0x83 };
     Assert.Throws <DecoderFallbackException>(
         () => encoder.GetString(encoded));
 }