// Token: 0x06002FC0 RID: 12224 RVA: 0x00115C40 File Offset: 0x00113E40
        public static BodyCharsetFlags GetBodyCharsetOptions(UserContext userContext, out string charsetName)
        {
            if (userContext == null)
            {
                throw new ArgumentNullException("userContext");
            }
            BodyCharsetFlags bodyCharsetFlags = BodyCharsetFlags.None;

            if (userContext.UseGB18030)
            {
                bodyCharsetFlags |= BodyCharsetFlags.PreferGB18030;
            }
            if (userContext.UseISO885915)
            {
                bodyCharsetFlags |= BodyCharsetFlags.PreferIso885915;
            }
            if (userContext.OutboundCharset == OutboundCharsetOptions.AlwaysUTF8)
            {
                bodyCharsetFlags |= BodyCharsetFlags.DisableCharsetDetection;
                charsetName       = "utf-8";
            }
            else
            {
                if (userContext.OutboundCharset == OutboundCharsetOptions.UserLanguageChoice)
                {
                    bodyCharsetFlags |= BodyCharsetFlags.DisableCharsetDetection;
                }
                else
                {
                    bodyCharsetFlags = bodyCharsetFlags;
                }
                CultureInfo userCulture = Microsoft.Exchange.Clients.Owa.Core.Culture.GetUserCulture();
                Microsoft.Exchange.Data.Globalization.Culture culture = null;
                if (Microsoft.Exchange.Data.Globalization.Culture.TryGetCulture(userCulture.Name, out culture))
                {
                    Charset mimeCharset = culture.MimeCharset;
                    if (mimeCharset.IsAvailable)
                    {
                        charsetName = mimeCharset.Name;
                        return(bodyCharsetFlags);
                    }
                }
                charsetName = Microsoft.Exchange.Data.Globalization.Culture.Default.MimeCharset.Name;
            }
            return(bodyCharsetFlags);
        }
예제 #2
0
 // Token: 0x06000ACE RID: 2766 RVA: 0x0005F4E5 File Offset: 0x0005D6E5
 internal void SetParentCulture(Culture parentCulture)
 {
     this.parentCulture = parentCulture;
 }
예제 #3
0
 internal void SetCulture(Culture culture)
 {
     this.culture = culture;
 }
예제 #4
0
 // Token: 0x06000AC7 RID: 2759 RVA: 0x0005F48F File Offset: 0x0005D68F
 public static bool TryGetCulture(int lcid, out Culture culture)
 {
     return(CultureCharsetDatabase.Data.LcidToCulture.TryGetValue(lcid, out culture));
 }