Exemplo n.º 1
0
        // Token: 0x06000A73 RID: 2675 RVA: 0x0003E3B8 File Offset: 0x0003C5B8
        public int GetCodePage(int[] codePagePriorityList, bool allowCommonFallbackExceptions, bool allowAnyFallbackExceptions, bool onlyValidCodePages)
        {
            uint num = uint.MaxValue;

            for (int i = 0; i < this.maskMap.Length; i++)
            {
                if (this.maskMap[i] != 0)
                {
                    uint num2 = CodePageDetectData.codePageMask[i];
                    if (allowAnyFallbackExceptions || (allowCommonFallbackExceptions && (CodePageDetectData.fallbackMask[i] & 1U) != 0U))
                    {
                        num2 |= (CodePageDetectData.fallbackMask[i] & 4294967294U);
                    }
                    num &= num2;
                    if (num == 0U)
                    {
                        break;
                    }
                }
            }
            if (onlyValidCodePages)
            {
                num &= CodePageDetect.ValidCodePagesMask;
            }
            return(CodePageDetect.GetCodePage(ref num, codePagePriorityList));
        }
        public int GetCodePage(int[] codePagePriorityList, bool onlyValidCodePages)
        {
            uint num = ~this.mask;

            if (onlyValidCodePages)
            {
                num &= CodePageDetect.ValidCodePagesMask;
            }
            return(CodePageDetect.GetCodePage(ref num, codePagePriorityList));
        }
Exemplo n.º 3
0
        public int GetCodePage(int[] codePagePriorityList, bool onlyValidCodePages)
        {
            var cumulativeMask = ~mask;

            if (onlyValidCodePages)
            {
                cumulativeMask &= CodePageDetect.validCodePagesMask;
            }

            return(CodePageDetect.GetCodePage(ref cumulativeMask, codePagePriorityList));
        }
        public int GetWindowsCodePage(int[] codePagePriorityList, bool onlyValidCodePages)
        {
            uint num = ~this.mask;

            num &= 260038656U;
            if (onlyValidCodePages)
            {
                num &= CodePageDetect.ValidCodePagesMask;
            }
            if (num == 0U)
            {
                return(1252);
            }
            return(CodePageDetect.GetCodePage(ref num, codePagePriorityList));
        }
Exemplo n.º 5
0
        public int GetWindowsCodePage(int[] codePagePriorityList, bool onlyValidCodePages)
        {
            var cumulativeMask = ~mask;


            cumulativeMask &= CodePageDetectData.windowsCodePagesMask;

            if (onlyValidCodePages)
            {
                cumulativeMask &= CodePageDetect.validCodePagesMask;
            }

            if (cumulativeMask == 0)
            {
                return(1252);
            }

            return(CodePageDetect.GetCodePage(ref cumulativeMask, codePagePriorityList));
        }
Exemplo n.º 6
0
        // Token: 0x06000A74 RID: 2676 RVA: 0x0003E428 File Offset: 0x0003C628
        public int[] GetCodePages(int[] codePagePriorityList, bool allowCommonFallbackExceptions, bool allowAnyFallbackExceptions, bool onlyValidCodePages)
        {
            uint num = uint.MaxValue;

            for (int i = 0; i < this.maskMap.Length; i++)
            {
                if (this.maskMap[i] != 0)
                {
                    uint num2 = CodePageDetectData.codePageMask[i];
                    if (allowAnyFallbackExceptions || (allowCommonFallbackExceptions && (CodePageDetectData.fallbackMask[i] & 1U) != 0U))
                    {
                        num2 |= (CodePageDetectData.fallbackMask[i] & 4294967294U);
                    }
                    num &= num2;
                    if (num == 0U)
                    {
                        break;
                    }
                }
            }
            if (onlyValidCodePages)
            {
                num &= CodePageDetect.ValidCodePagesMask;
            }
            int codePageCount = CodePageDetect.GetCodePageCount(num);

            int[] array = new int[codePageCount];
            int   num3  = 0;

            while (num != 0U)
            {
                array[num3++] = CodePageDetect.GetCodePage(ref num, codePagePriorityList);
            }
            array[num3] = 65001;
            return(array);
        }
Exemplo n.º 7
0
 public int GetCodePage()
 {
     return(detector.GetCodePage(Culture.Default.CodepageDetectionPriorityOrder, false /*allowCommonFallbackExceptions*/, false /*allowAnyFallbackExceptions*/, true /*onlyValidCodePages*/));
 }