ISCIIEncoding
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
namespace System.Text
{
    internal sealed class ISCIIEncoding : EncodingNLS, ISerializable
    {
        internal sealed class ISCIIEncoder : System.Text.EncoderNLS
        {
            internal int defaultCodePage;
            internal int currentCodePage;
            internal bool bLastVirama;
            internal override bool HasState {
                get {
                    if (charLeftOver == ' ')
                        return currentCodePage != defaultCodePage;
                    return true;
                }
            }
            public ISCIIEncoder(EncodingNLS encoding)
                : base(encoding)
            {
                currentCodePage = (defaultCodePage = encoding.CodePage - 57000);
            }
            public override void Reset()
            {
                bLastVirama = false;
                charLeftOver = ' ';
                m_fallbackBuffer?.Reset();
            }
        }
        internal sealed class ISCIIDecoder : System.Text.DecoderNLS
        {
            internal int currentCodePage;
            internal bool bLastATR;
            internal bool bLastVirama;
            internal bool bLastDevenagariStressAbbr;
            internal char cLastCharForNextNukta;
            internal char cLastCharForNoNextNukta;
            internal override bool HasState {
                get {
                    if (cLastCharForNextNukta == ' ' && cLastCharForNoNextNukta == ' ' && !bLastATR)
                        return bLastDevenagariStressAbbr;
                    return true;
                }
            }
            public ISCIIDecoder(EncodingNLS encoding)
                : base(encoding)
            {
                currentCodePage = encoding.CodePage - 57000;
            }
            public override void Reset()
            {
                bLastATR = false;
                bLastVirama = false;
                bLastDevenagariStressAbbr = false;
                cLastCharForNextNukta = ' ';
                cLastCharForNoNextNukta = ' ';
                m_fallbackBuffer?.Reset();
            }
        }
        private readonly int _defaultCodePage;
        private static readonly char[,,] s_IndicMapping = new char[9, 2, 96] {
            {
                {
                    ' ',
                    'ँ',
                    'ं',
                    'ः',
                    'अ',
                    'आ',
                    'इ',
                    'ई',
                    'उ',
                    'ऊ',
                    'ऋ',
                    'ऎ',
                    'ए',
                    'ऐ',
                    'ऍ',
                    'ऒ',
                    'ओ',
                    'औ',
                    'ऑ',
                    'क',
                    'ख',
                    'ग',
                    'घ',
                    'ङ',
                    'च',
                    'छ',
                    'ज',
                    'झ',
                    'ञ',
                    'ट',
                    'ठ',
                    'ड',
                    'ढ',
                    'ण',
                    'त',
                    'थ',
                    'द',
                    'ध',
                    'न',
                    'ऩ',
                    'प',
                    'फ',
                    'ब',
                    'भ',
                    'म',
                    'य',
                    'य़',
                    'र',
                    'ऱ',
                    'ल',
                    'ळ',
                    'ऴ',
                    'व',
                    'श',
                    'ष',
                    'स',
                    'ह',
                    ' ',
                    'ा',
                    'ि',
                    'ी',
                    'ु',
                    'ू',
                    'ृ',
                    'ॆ',
                    'े',
                    'ै',
                    'ॅ',
                    'ॊ',
                    'ो',
                    'ौ',
                    'ॉ',
                    '्',
                    '़',
                    '।',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    '०',
                    '१',
                    '२',
                    '३',
                    '४',
                    '५',
                    '६',
                    '७',
                    '८',
                    '९',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' '
                },
                {
                    ' ',
                    'ॐ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    'ऌ',
                    'ॡ',
                    ' ',
                    ' ',
                    'ॠ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    'क़',
                    'ख़',
                    'ग़',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    'ज़',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    'ड़',
                    'ढ़',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    'फ़',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    'ॢ',
                    'ॣ',
                    ' ',
                    ' ',
                    'ॄ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    '',
                    '',
                    'ऽ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    '뢿',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' '
                }
            },
            {
                {
                    ' ',
                    'ঁ',
                    'ং',
                    'ঃ',
                    'অ',
                    'আ',
                    'ই',
                    'ঈ',
                    'উ',
                    'ঊ',
                    'ঋ',
                    'এ',
                    'এ',
                    'ঐ',
                    'ঐ',
                    'ও',
                    'ও',
                    'ঔ',
                    'ঔ',
                    'ক',
                    'খ',
                    'গ',
                    'ঘ',
                    'ঙ',
                    'চ',
                    'ছ',
                    'জ',
                    'ঝ',
                    'ঞ',
                    'ট',
                    'ঠ',
                    'ড',
                    'ঢ',
                    'ণ',
                    'ত',
                    'থ',
                    'দ',
                    'ধ',
                    'ন',
                    'ন',
                    'প',
                    'ফ',
                    'ব',
                    'ভ',
                    'ম',
                    'য',
                    'য়',
                    'র',
                    'র',
                    'ল',
                    'ল',
                    'ল',
                    'ব',
                    'শ',
                    'ষ',
                    'স',
                    'হ',
                    ' ',
                    'া',
                    'ি',
                    'ী',
                    'ু',
                    'ূ',
                    'ৃ',
                    'ে',
                    'ে',
                    'ৈ',
                    'ৈ',
                    'ো',
                    'ো',
                    'ৌ',
                    'ৌ',
                    '্',
                    '়',
                    '.',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    '০',
                    '১',
                    '২',
                    '৩',
                    '৪',
                    '৫',
                    '৬',
                    '৭',
                    '৮',
                    '৯',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' '
                },
                {
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    'ঌ',
                    'ৡ',
                    ' ',
                    ' ',
                    'ৠ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    'ড়',
                    'ঢ়',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    'ৢ',
                    'ৣ',
                    ' ',
                    ' ',
                    'ৄ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    '',
                    '',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' '
                }
            },
            {
                {
                    ' ',
                    ' ',
                    'ஂ',
                    'ஃ',
                    'அ',
                    'ஆ',
                    'இ',
                    'ஈ',
                    'உ',
                    'ஊ',
                    ' ',
                    'ஏ',
                    'ஏ',
                    'ஐ',
                    'ஐ',
                    'ஒ',
                    'ஓ',
                    'ஔ',
                    'ஔ',
                    'க',
                    'க',
                    'க',
                    'க',
                    'ங',
                    'ச',
                    'ச',
                    'ஜ',
                    'ஜ',
                    'ஞ',
                    'ட',
                    'ட',
                    'ட',
                    'ட',
                    'ண',
                    'த',
                    'த',
                    'த',
                    'த',
                    'ந',
                    'ன',
                    'ப',
                    'ப',
                    'ப',
                    'ப',
                    'ம',
                    'ய',
                    'ய',
                    'ர',
                    'ற',
                    'ல',
                    'ள',
                    'ழ',
                    'வ',
                    'ஷ',
                    'ஷ',
                    'ஸ',
                    'ஹ',
                    ' ',
                    'ா',
                    'ி',
                    'ீ',
                    'ு',
                    'ூ',
                    ' ',
                    'ெ',
                    'ே',
                    'ை',
                    'ை',
                    'ொ',
                    'ோ',
                    'ௌ',
                    'ௌ',
                    '்',
                    ' ',
                    '.',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    '0',
                    '௧',
                    '௨',
                    '௩',
                    '௪',
                    '௫',
                    '௬',
                    '௭',
                    '௮',
                    '௯',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' '
                },
                {
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    '',
                    '',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' '
                }
            },
            {
                {
                    ' ',
                    'ఁ',
                    'ం',
                    'ః',
                    'అ',
                    'ఆ',
                    'ఇ',
                    'ఈ',
                    'ఉ',
                    'ఊ',
                    'ఋ',
                    'ఎ',
                    'ఏ',
                    'ఐ',
                    'ఐ',
                    'ఒ',
                    'ఓ',
                    'ఔ',
                    'ఔ',
                    'క',
                    'ఖ',
                    'గ',
                    'ఘ',
                    'ఙ',
                    'చ',
                    'ఛ',
                    'జ',
                    'ఝ',
                    'ఞ',
                    'ట',
                    'ఠ',
                    'డ',
                    'ఢ',
                    'ణ',
                    'త',
                    'థ',
                    'ద',
                    'ధ',
                    'న',
                    'న',
                    'ప',
                    'ఫ',
                    'బ',
                    'భ',
                    'మ',
                    'య',
                    'య',
                    'ర',
                    'ఱ',
                    'ల',
                    'ళ',
                    'ళ',
                    'వ',
                    'శ',
                    'ష',
                    'స',
                    'హ',
                    ' ',
                    'ా',
                    'ి',
                    'ీ',
                    'ు',
                    'ూ',
                    'ృ',
                    'ె',
                    'ే',
                    'ై',
                    'ై',
                    'ొ',
                    'ో',
                    'ౌ',
                    'ౌ',
                    '్',
                    ' ',
                    '.',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    '౦',
                    '౧',
                    '౨',
                    '౩',
                    '౪',
                    '౫',
                    '౬',
                    '౭',
                    '౮',
                    '౯',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' '
                },
                {
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    'ఌ',
                    'ౡ',
                    ' ',
                    ' ',
                    'ౠ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    'ౄ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    '',
                    '',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' '
                }
            },
            {
                {
                    ' ',
                    'ଁ',
                    'ଂ',
                    'ଃ',
                    'ଅ',
                    'ଆ',
                    'ଇ',
                    'ଈ',
                    'ଉ',
                    'ଊ',
                    'ଋ',
                    'ଏ',
                    'ଏ',
                    'ଐ',
                    'ଐ',
                    'ଐ',
                    'ଓ',
                    'ଔ',
                    'ଔ',
                    'କ',
                    'ଖ',
                    'ଗ',
                    'ଘ',
                    'ଙ',
                    'ଚ',
                    'ଛ',
                    'ଜ',
                    'ଝ',
                    'ଞ',
                    'ଟ',
                    'ଠ',
                    'ଡ',
                    'ଢ',
                    'ଣ',
                    'ତ',
                    'ଥ',
                    'ଦ',
                    'ଧ',
                    'ନ',
                    'ନ',
                    'ପ',
                    'ଫ',
                    'ବ',
                    'ଭ',
                    'ମ',
                    'ଯ',
                    'ୟ',
                    'ର',
                    'ର',
                    'ଲ',
                    'ଳ',
                    'ଳ',
                    'ବ',
                    'ଶ',
                    'ଷ',
                    'ସ',
                    'ହ',
                    ' ',
                    'ା',
                    'ି',
                    'ୀ',
                    'ୁ',
                    'ୂ',
                    'ୃ',
                    'େ',
                    'େ',
                    'ୈ',
                    'ୈ',
                    'ୋ',
                    'ୋ',
                    'ୌ',
                    'ୌ',
                    '୍',
                    '଼',
                    '.',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    '୦',
                    '୧',
                    '୨',
                    '୩',
                    '୪',
                    '୫',
                    '୬',
                    '୭',
                    '୮',
                    '୯',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' '
                },
                {
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    'ఌ',
                    'ౡ',
                    ' ',
                    ' ',
                    'ౠ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    'ଡ଼',
                    'ଢ଼',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    'ౄ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    '',
                    '',
                    'ଽ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' '
                }
            },
            {
                {
                    ' ',
                    ' ',
                    'ಂ',
                    'ಃ',
                    'ಅ',
                    'ಆ',
                    'ಇ',
                    'ಈ',
                    'ಉ',
                    'ಊ',
                    'ಋ',
                    'ಎ',
                    'ಏ',
                    'ಐ',
                    'ಐ',
                    'ಒ',
                    'ಓ',
                    'ಔ',
                    'ಔ',
                    'ಕ',
                    'ಖ',
                    'ಗ',
                    'ಘ',
                    'ಙ',
                    'ಚ',
                    'ಛ',
                    'ಜ',
                    'ಝ',
                    'ಞ',
                    'ಟ',
                    'ಠ',
                    'ಡ',
                    'ಢ',
                    'ಣ',
                    'ತ',
                    'ಥ',
                    'ದ',
                    'ಧ',
                    'ನ',
                    'ನ',
                    'ಪ',
                    'ಫ',
                    'ಬ',
                    'ಭ',
                    'ಮ',
                    'ಯ',
                    'ಯ',
                    'ರ',
                    'ಱ',
                    'ಲ',
                    'ಳ',
                    'ಳ',
                    'ವ',
                    'ಶ',
                    'ಷ',
                    'ಸ',
                    'ಹ',
                    ' ',
                    'ಾ',
                    'ಿ',
                    'ೀ',
                    'ು',
                    'ೂ',
                    'ೃ',
                    'ೆ',
                    'ೇ',
                    'ೈ',
                    'ೈ',
                    'ೊ',
                    'ೋ',
                    'ೌ',
                    'ೌ',
                    '್',
                    ' ',
                    '.',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    '೦',
                    '೧',
                    '೨',
                    '೩',
                    '೪',
                    '೫',
                    '೬',
                    '೭',
                    '೮',
                    '೯',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' '
                },
                {
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    'ಌ',
                    'ೡ',
                    ' ',
                    ' ',
                    'ೠ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    'ೞ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    'ೄ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    '',
                    '',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' '
                }
            },
            {
                {
                    ' ',
                    ' ',
                    'ം',
                    'ഃ',
                    'അ',
                    'ആ',
                    'ഇ',
                    'ഈ',
                    'ഉ',
                    'ഊ',
                    'ഋ',
                    'എ',
                    'ഏ',
                    'ഐ',
                    'ഐ',
                    'ഒ',
                    'ഓ',
                    'ഔ',
                    'ഔ',
                    'ക',
                    'ഖ',
                    'ഗ',
                    'ഘ',
                    'ങ',
                    'ച',
                    'ഛ',
                    'ജ',
                    'ഝ',
                    'ഞ',
                    'ട',
                    'ഠ',
                    'ഡ',
                    'ഢ',
                    'ണ',
                    'ത',
                    'ഥ',
                    'ദ',
                    'ധ',
                    'ന',
                    'ന',
                    'പ',
                    'ഫ',
                    'ബ',
                    'ഭ',
                    'മ',
                    'യ',
                    'യ',
                    'ര',
                    'റ',
                    'ല',
                    'ള',
                    'ഴ',
                    'വ',
                    'ശ',
                    'ഷ',
                    'സ',
                    'ഹ',
                    ' ',
                    'ാ',
                    'ി',
                    'ീ',
                    'ു',
                    'ൂ',
                    'ൃ',
                    'െ',
                    'േ',
                    'ൈ',
                    'ൈ',
                    'ൊ',
                    'ോ',
                    'ൌ',
                    'ൌ',
                    '്',
                    ' ',
                    '.',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    '൦',
                    '൧',
                    '൨',
                    '൩',
                    '൪',
                    '൫',
                    '൬',
                    '൭',
                    '൮',
                    '൯',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' '
                },
                {
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    'ഌ',
                    'ൡ',
                    ' ',
                    ' ',
                    'ൠ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    '',
                    '',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' '
                }
            },
            {
                {
                    ' ',
                    'ઁ',
                    'ં',
                    'ઃ',
                    'અ',
                    'આ',
                    'ઇ',
                    'ઈ',
                    'ઉ',
                    'ઊ',
                    'ઋ',
                    'એ',
                    'એ',
                    'ઐ',
                    'ઍ',
                    'ઍ',
                    'ઓ',
                    'ઔ',
                    'ઑ',
                    'ક',
                    'ખ',
                    'ગ',
                    'ઘ',
                    'ઙ',
                    'ચ',
                    'છ',
                    'જ',
                    'ઝ',
                    'ઞ',
                    'ટ',
                    'ઠ',
                    'ડ',
                    'ઢ',
                    'ણ',
                    'ત',
                    'થ',
                    'દ',
                    'ધ',
                    'ન',
                    'ન',
                    'પ',
                    'ફ',
                    'બ',
                    'ભ',
                    'મ',
                    'ય',
                    'ય',
                    'ર',
                    'ર',
                    'લ',
                    'ળ',
                    'ળ',
                    'વ',
                    'શ',
                    'ષ',
                    'સ',
                    'હ',
                    ' ',
                    'ા',
                    'િ',
                    'ી',
                    'ુ',
                    'ૂ',
                    'ૃ',
                    'ે',
                    'ે',
                    'ૈ',
                    'ૅ',
                    'ો',
                    'ો',
                    'ૌ',
                    'ૉ',
                    '્',
                    '઼',
                    '.',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    '૦',
                    '૧',
                    '૨',
                    '૩',
                    '૪',
                    '૫',
                    '૬',
                    '૭',
                    '૮',
                    '૯',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' '
                },
                {
                    ' ',
                    'ૐ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    'ૠ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    'ૄ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    '',
                    '',
                    'ઽ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' '
                }
            },
            {
                {
                    ' ',
                    ' ',
                    'ਂ',
                    ' ',
                    'ਅ',
                    'ਆ',
                    'ਇ',
                    'ਈ',
                    'ਉ',
                    'ਊ',
                    ' ',
                    'ਏ',
                    'ਏ',
                    'ਐ',
                    'ਐ',
                    'ਐ',
                    'ਓ',
                    'ਔ',
                    'ਔ',
                    'ਕ',
                    'ਖ',
                    'ਗ',
                    'ਘ',
                    'ਙ',
                    'ਚ',
                    'ਛ',
                    'ਜ',
                    'ਝ',
                    'ਞ',
                    'ਟ',
                    'ਠ',
                    'ਡ',
                    'ਢ',
                    'ਣ',
                    'ਤ',
                    'ਥ',
                    'ਦ',
                    'ਧ',
                    'ਨ',
                    'ਨ',
                    'ਪ',
                    'ਫ',
                    'ਬ',
                    'ਭ',
                    'ਮ',
                    'ਯ',
                    'ਯ',
                    'ਰ',
                    'ਰ',
                    'ਲ',
                    'ਲ਼',
                    'ਲ਼',
                    'ਵ',
                    'ਸ਼',
                    'ਸ਼',
                    'ਸ',
                    'ਹ',
                    ' ',
                    'ਾ',
                    'ਿ',
                    'ੀ',
                    'ੁ',
                    'ੂ',
                    ' ',
                    'ੇ',
                    'ੇ',
                    'ੈ',
                    'ੈ',
                    'ੋ',
                    'ੋ',
                    'ੌ',
                    'ੌ',
                    '੍',
                    '਼',
                    '.',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    '੦',
                    '੧',
                    '੨',
                    '੩',
                    '੪',
                    '੫',
                    '੬',
                    '੭',
                    '੮',
                    '੯',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' '
                },
                {
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    'ਖ਼',
                    'ਗ਼',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    'ਜ਼',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    'ੜ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    'ਫ਼',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    '',
                    '',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' ',
                    ' '
                }
            }
        };
        private static ReadOnlySpan<int> UnicodeToIndicChar => RuntimeHelpers.CreateSpan<int>((RuntimeFieldHandle));
        private unsafe static ReadOnlySpan<byte> SecondIndicByte => new ReadOnlySpan<byte>(&global::<PrivateImplementationDetails>.6624BBD769A2E8BBB96C33C89D8020408F5BD488277E13E6EF692D114DBCD24A, 4);
        private static ReadOnlySpan<int> IndicMappingIndex => RuntimeHelpers.CreateSpan<int>((RuntimeFieldHandle));
        public ISCIIEncoding(int codePage)
            : base(codePage)
        {
            _defaultCodePage = codePage - 57000;
            if (_defaultCodePage < 2 || _defaultCodePage > 11)
                throw new ArgumentException(System.SR.Format(System.SR.Argument_CodepageNotSupported, codePage), "codePage");
        }
        void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
        {
            throw new PlatformNotSupportedException();
        }
        public override int GetMaxByteCount(int charCount)
        {
            if (charCount < 0)
                throw new ArgumentOutOfRangeException("charCount", System.SR.ArgumentOutOfRange_NeedNonNegNum);
            long num = (long)charCount + 1;
            if (base.EncoderFallback.MaxCharCount > 1)
                num *= base.EncoderFallback.MaxCharCount;
            num *= 4;
            if (num > 2147483647)
                throw new ArgumentOutOfRangeException("charCount", System.SR.ArgumentOutOfRange_GetByteCountOverflow);
            return (int)num;
        }
        public override int GetMaxCharCount(int byteCount)
        {
            if (byteCount < 0)
                throw new ArgumentOutOfRangeException("byteCount", System.SR.ArgumentOutOfRange_NeedNonNegNum);
            long num = (long)byteCount + 1;
            if (base.DecoderFallback.MaxCharCount > 1)
                num *= base.DecoderFallback.MaxCharCount;
            if (num > 2147483647)
                throw new ArgumentOutOfRangeException("byteCount", System.SR.ArgumentOutOfRange_GetCharCountOverflow);
            return (int)num;
        }
        public unsafe override int GetByteCount(char* chars, int count, System.Text.EncoderNLS baseEncoder)
        {
            return GetBytes(chars, count, null, 0, baseEncoder);
        }
        public unsafe override int GetBytes(char* chars, int charCount, byte* bytes, int byteCount, System.Text.EncoderNLS baseEncoder)
        {
            ISCIIEncoder iSCIIEncoder = (ISCIIEncoder)baseEncoder;
            EncodingByteBuffer encodingByteBuffer = new EncodingByteBuffer(this, iSCIIEncoder, bytes, byteCount, chars, charCount);
            int num = _defaultCodePage;
            bool flag = false;
            if (iSCIIEncoder != null) {
                num = iSCIIEncoder.currentCodePage;
                flag = iSCIIEncoder.bLastVirama;
                if (iSCIIEncoder.charLeftOver > ' ') {
                    encodingByteBuffer.Fallback(iSCIIEncoder.charLeftOver);
                    flag = false;
                }
            }
            while (encodingByteBuffer.MoreData) {
                char nextChar = encodingByteBuffer.GetNextChar();
                if (nextChar < ' ') {
                    if (!encodingByteBuffer.AddByte((byte)nextChar))
                        break;
                    flag = false;
                } else if (nextChar < 'ँ' || nextChar > '൯') {
                    if (flag && (nextChar == '' || nextChar == '')) {
                        if (nextChar == '') {
                            if (!encodingByteBuffer.AddByte(232))
                                break;
                        } else if (!encodingByteBuffer.AddByte(233)) {
                            break;
                        }
                        flag = false;
                    } else {
                        encodingByteBuffer.Fallback(nextChar);
                        flag = false;
                    }
                } else {
                    int num2 = UnicodeToIndicChar[nextChar - 2305];
                    byte b = (byte)num2;
                    int num3 = 15 & (num2 >> 8);
                    int num4 = 61440 & num2;
                    if (num2 == 0) {
                        encodingByteBuffer.Fallback(nextChar);
                        flag = false;
                    } else {
                        if (num3 != num) {
                            if (!encodingByteBuffer.AddByte(239, (byte)(num3 | 64)))
                                break;
                            num = num3;
                        }
                        if (!encodingByteBuffer.AddByte(b, (num4 != 0) ? 1 : 0))
                            break;
                        flag = (b == 232);
                        if (num4 != 0 && !encodingByteBuffer.AddByte(SecondIndicByte[num4 >> 12]))
                            break;
                    }
                }
            }
            if (num != _defaultCodePage && (iSCIIEncoder == null || iSCIIEncoder.MustFlush)) {
                if (encodingByteBuffer.AddByte(239, (byte)(_defaultCodePage | 64)))
                    num = _defaultCodePage;
                else
                    encodingByteBuffer.GetNextChar();
                flag = false;
            }
            if (iSCIIEncoder != null && bytes != null) {
                if (!encodingByteBuffer.fallbackBufferHelper.bUsedEncoder)
                    iSCIIEncoder.charLeftOver = ' ';
                iSCIIEncoder.currentCodePage = num;
                iSCIIEncoder.bLastVirama = flag;
                iSCIIEncoder.m_charsUsed = encodingByteBuffer.CharsUsed;
            }
            return encodingByteBuffer.Count;
        }
        public unsafe override int GetCharCount(byte* bytes, int count, System.Text.DecoderNLS baseDecoder)
        {
            return GetChars(bytes, count, null, 0, baseDecoder);
        }
        public unsafe override int GetChars(byte* bytes, int byteCount, char* chars, int charCount, System.Text.DecoderNLS baseDecoder)
        {
            ISCIIDecoder iSCIIDecoder = (ISCIIDecoder)baseDecoder;
            EncodingCharBuffer encodingCharBuffer = new EncodingCharBuffer(this, iSCIIDecoder, chars, charCount, bytes, byteCount);
            int num = _defaultCodePage;
            bool flag = false;
            bool flag2 = false;
            bool flag3 = false;
            char c = ' ';
            char c2 = ' ';
            if (iSCIIDecoder != null) {
                num = iSCIIDecoder.currentCodePage;
                flag = iSCIIDecoder.bLastATR;
                flag2 = iSCIIDecoder.bLastVirama;
                flag3 = iSCIIDecoder.bLastDevenagariStressAbbr;
                c = iSCIIDecoder.cLastCharForNextNukta;
                c2 = iSCIIDecoder.cLastCharForNoNextNukta;
            }
            bool flag4 = flag2 | flag | flag3 | (c != ' ');
            int num2 = -1;
            if (num >= 2 && num <= 11)
                num2 = IndicMappingIndex[num];
            while (encodingCharBuffer.MoreData) {
                byte nextByte = encodingCharBuffer.GetNextByte();
                if (flag4) {
                    flag4 = false;
                    if (flag) {
                        if (nextByte >= 66 && nextByte <= 75) {
                            num = (nextByte & 15);
                            num2 = IndicMappingIndex[num];
                            flag = false;
                        } else {
                            switch (nextByte) {
                            case 64:
                                break;
                            case 65:
                                goto IL_010e;
                            default:
                                goto IL_013a;
                            }
                            num = _defaultCodePage;
                            num2 = -1;
                            if (num >= 2 && num <= 11)
                                num2 = IndicMappingIndex[num];
                            flag = false;
                        }
                        continue;
                    }
                    if (flag2) {
                        switch (nextByte) {
                        case 232:
                            break;
                        case 233:
                            goto IL_017f;
                        default:
                            goto IL_0197;
                        }
                        if (!encodingCharBuffer.AddChar(''))
                            break;
                        flag2 = false;
                        continue;
                    }
                    if (flag3) {
                        switch (nextByte) {
                        case 184:
                            break;
                        case 191:
                            goto IL_01cd;
                        default:
                            goto IL_01e5;
                        }
                        if (!encodingCharBuffer.AddChar('॒'))
                            break;
                        flag3 = false;
                        continue;
                    }
                    if (nextByte == 233) {
                        if (!encodingCharBuffer.AddChar(c))
                            break;
                        c = (c2 = ' ');
                        continue;
                    }
                    if (!encodingCharBuffer.AddChar(c2))
                        break;
                    c = (c2 = ' ');
                }
                goto IL_022e;
                IL_01cd:
                if (!encodingCharBuffer.AddChar('॰'))
                    break;
                flag3 = false;
                continue;
                IL_01e5:
                if (!encodingCharBuffer.Fallback(240))
                    break;
                flag3 = false;
                goto IL_022e;
                IL_02bc:
                char c3;
                if (!encodingCharBuffer.AddChar(c3))
                    break;
                flag2 = (flag4 = true);
                continue;
                IL_017f:
                if (!encodingCharBuffer.AddChar(''))
                    break;
                flag2 = false;
                continue;
                IL_02ce:
                char c4;
                if ((c4 & 61440) == 0) {
                    flag4 = true;
                    c = c4;
                    c2 = c3;
                } else
                    flag3 = (flag4 = true);
                continue;
                IL_0197:
                flag2 = false;
                goto IL_022e;
                IL_013a:
                if (!encodingCharBuffer.Fallback(239))
                    break;
                flag = false;
                goto IL_022e;
                IL_022e:
                if (nextByte < 160) {
                    if (!encodingCharBuffer.AddChar((char)nextByte))
                        break;
                } else if (nextByte == 239) {
                    flag = (flag4 = true);
                } else {
                    c3 = s_IndicMapping[num2, 0, nextByte - 160];
                    c4 = s_IndicMapping[num2, 1, nextByte - 160];
                    if (c4 != 0) {
                        switch (nextByte) {
                        case 233:
                            break;
                        case 232:
                            goto IL_02bc;
                        default:
                            goto IL_02ce;
                        }
                    }
                    if (c3 == ' ') {
                        if (!encodingCharBuffer.Fallback(nextByte))
                            break;
                    } else if (!encodingCharBuffer.AddChar(c3)) {
                        break;
                    }
                }
                continue;
                IL_010e:
                num = _defaultCodePage;
                num2 = -1;
                if (num >= 2 && num <= 11)
                    num2 = IndicMappingIndex[num];
                flag = false;
            }
            if (iSCIIDecoder == null || iSCIIDecoder.MustFlush) {
                if (flag) {
                    if (encodingCharBuffer.Fallback(239))
                        flag = false;
                    else
                        encodingCharBuffer.GetNextByte();
                } else if (flag3) {
                    if (encodingCharBuffer.Fallback(240))
                        flag3 = false;
                    else
                        encodingCharBuffer.GetNextByte();
                } else if (c2 != 0) {
                    if (encodingCharBuffer.AddChar(c2))
                        c2 = (c = ' ');
                    else
                        encodingCharBuffer.GetNextByte();
                }
            }
            if (iSCIIDecoder != null && chars != null) {
                if ((!iSCIIDecoder.MustFlush || c2 != ' ') | flag | flag3) {
                    iSCIIDecoder.currentCodePage = num;
                    iSCIIDecoder.bLastVirama = flag2;
                    iSCIIDecoder.bLastATR = flag;
                    iSCIIDecoder.bLastDevenagariStressAbbr = flag3;
                    iSCIIDecoder.cLastCharForNextNukta = c;
                    iSCIIDecoder.cLastCharForNoNextNukta = c2;
                } else {
                    iSCIIDecoder.currentCodePage = _defaultCodePage;
                    iSCIIDecoder.bLastVirama = false;
                    iSCIIDecoder.bLastATR = false;
                    iSCIIDecoder.bLastDevenagariStressAbbr = false;
                    iSCIIDecoder.cLastCharForNextNukta = ' ';
                    iSCIIDecoder.cLastCharForNoNextNukta = ' ';
                }
                iSCIIDecoder.m_bytesUsed = encodingCharBuffer.BytesUsed;
            }
            return encodingCharBuffer.Count;
        }
        public override Decoder GetDecoder()
        {
            return new ISCIIDecoder(this);
        }
        public override Encoder GetEncoder()
        {
            return new ISCIIEncoder(this);
        }
        public override int GetHashCode()
        {
            return _defaultCodePage + base.EncoderFallback.GetHashCode() + base.DecoderFallback.GetHashCode();
        }
    }
}