Наследование: System.Text.Encoding
Пример #1
0
        private static Encoding MakeSourceEncoding() {
            Encoding enc = new PythonAsciiEncoding();
#if FEATURE_ENCODING
            // we need to Clone the new instance here so that the base class marks us as non-readonly
            enc = (Encoding)enc.Clone();
            enc.DecoderFallback = new SourceNonStrictDecoderFallback();
#endif
            return enc;
        }
Пример #2
0
        private static Encoding MakeSourceEncoding()
        {
            Encoding enc = new PythonAsciiEncoding();

#if FEATURE_ENCODING
            // we need to Clone the new instance here so that the base class marks us as non-readonly
            enc = (Encoding)enc.Clone();
            enc.DecoderFallback = new SourceNonStrictDecoderFallback();
#endif
            return(enc);
        }
Пример #3
0
        internal static Encoding MakeNonThrowing()
        {
            Encoding enc;

#if FEATURE_ENCODING
            enc = new PythonAsciiEncoding(new NonStrictEncoderFallback(), new NonStrictDecoderFallback());
#else
            enc = new PythonAsciiEncoding();
#endif
            return(enc);
        }
Пример #4
0
        internal static Encoding MakeNonThrowing()
        {
            Encoding enc = new PythonAsciiEncoding();

#if FEATURE_ENCODING
            // we need to Clone the new instance here so that the base class marks us as non-readonly
            enc = (Encoding)enc.Clone();
            StringOps.SetDecoderFallback(enc, new NonStrictDecoderFallback());
            StringOps.SetEncoderFallback(enc, new NonStrictEncoderFallback());
#endif
            return(enc);
        }
Пример #5
0
 public PythonAsciiDecoder(PythonAsciiEncoding encoding)
 {
     _encoding     = encoding;
     this.Fallback = encoding.DecoderFallback;
 }