mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-15 05:26:01 +00:00
29 lines
793 B
C#
29 lines
793 B
C#
using System.Globalization;
|
|
using System.Text;
|
|
|
|
namespace SharpCompress.Common
|
|
{
|
|
public class ArchiveEncoding
|
|
{
|
|
/// <summary>
|
|
/// Default encoding to use when archive format doesn't specify one.
|
|
/// </summary>
|
|
public static Encoding Default;
|
|
|
|
/// <summary>
|
|
/// Encoding used by encryption schemes which don't comply with RFC 2898.
|
|
/// </summary>
|
|
public static Encoding Password;
|
|
|
|
static ArchiveEncoding()
|
|
{
|
|
#if SILVERLIGHT || PORTABLE
|
|
Default = Encoding.UTF8;
|
|
Password = Encoding.UTF8;
|
|
#else
|
|
Default = Encoding.GetEncoding(CultureInfo.CurrentCulture.TextInfo.OEMCodePage);
|
|
Password = Encoding.Default;
|
|
#endif
|
|
}
|
|
}
|
|
} |