public int[] GetCodePages(Charset preferredCharset, bool allowCommonFallbackExceptions)
 {
     int[] array = Culture.Default.CodepageDetectionPriorityOrder;
     if (preferredCharset != null)
     {
         array = CultureCharsetDatabase.GetAdjustedCodepageDetectionPriorityOrder(preferredCharset, array);
     }
     return(this.detector.GetCodePages(array, allowCommonFallbackExceptions, false, true));
 }
Пример #2
0
        public int[] GetCodePages(Charset preferredCharset, bool allowCommonFallbackExceptions)
        {
            var priorityOrder = Culture.Default.CodepageDetectionPriorityOrder;

            if (preferredCharset != null)
            {
                priorityOrder = CultureCharsetDatabase.GetAdjustedCodepageDetectionPriorityOrder(preferredCharset, priorityOrder);
            }

            return(detector.GetCodePages(
                       priorityOrder,
                       allowCommonFallbackExceptions,
                       false /*allowAnyFallbackExceptions*/,
                       true));
        }