예제 #1
0
 internal int[] GetCodepageDetectionPriorityOrder(CultureCharsetDatabase.GlobalizationData data)
 {
     if (this.codepageDetectionPriorityOrder == null)
     {
         this.codepageDetectionPriorityOrder = CultureCharsetDatabase.GetCultureSpecificCodepageDetectionPriorityOrder(this, (this.parentCulture == null || this.parentCulture == this) ? data.DefaultDetectionPriorityOrder : this.parentCulture.GetCodepageDetectionPriorityOrder(data));
     }
     return(this.codepageDetectionPriorityOrder);
 }
예제 #2
0
 /// <summary>
 /// Gets code page detection priority order for the specified globalization data.
 /// </summary>
 /// <param name="data">
 /// The globalization data.
 /// </param>
 /// <returns>
 /// The code page detection priority.
 /// </returns>
 internal int[] GetCodepageDetectionPriorityOrder(CultureCharsetDatabase.GlobalizationData data)
 {
     int[] arg_3E_0;
     if ((arg_3E_0 = codepageDetectionPriorityOrder) == null)
     {
         arg_3E_0 = (codepageDetectionPriorityOrder = CultureCharsetDatabase.GetCultureSpecificCodepageDetectionPriorityOrder(this, (ParentCulture == null || ParentCulture == this) ? data.DefaultDetectionPriorityOrder : ParentCulture.GetCodepageDetectionPriorityOrder(data)));
     }
     return(arg_3E_0);
 }
 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));
 }
예제 #4
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));
        }