/// <summary> /// Gets the default encoding for the given configuration. /// </summary> /// <param name="configuration"> /// The configuration to use for getting the default encoding. /// </param> /// <returns>The current encoding.</returns> public static Encoding DefaultEncoding(this IConfiguration configuration) { if (configuration == null) { configuration = Configuration.Default; } return(TextEncoding.Suggest(configuration.GetLanguage())); }