Microshaoft.cs
(开头部分) 98KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Text;
namespace Microshaoft.Text
{
#region Class IdentifyEncoding.....
/// <summary>
/// 检测字符编码的类
/// <seealso cref="System.IO.Stream"/>
/// <seealso cref="System.Uri"/>
/// <seealso cref="System.IO.FileInfo"/>
/// </summary>
/// <remarks>
/// <![CDATA[
/// <strong>IdentifyEncoding</strong> 用来检测 <see cref="Uri"/>,<see cref="System.IO.FileInfo"/>,<see cref="sbyte"/> 字节数组的编码.
/// Create By lion <br/>
/// 2005-02-21 22:00 <br/>
/// Support .Net Framework v1.1.4322 <br/>
/// WebSite:www.lionsky.net(lion-a AT sohu.com) <br/>
/// ]]>
/// </remarks>
public class IdentifyEncoding
{
#region Fields.....
// Frequency tables to hold the GB, Big5, and EUC-TW character
// frequencies
internal static int[][] GBFreq = new int[94][];
internal static int[][] GBKFreq = new int[126][];
internal static int[][] Big5Freq = new int[94][];
internal static int[][] EUC_TWFreq = new int[94][];
internal static string[] nicename = new string[]
{
"GB2312", "GBK", "HZ", "Big5", "CNS 11643"
, "ISO 2022CN", "UTF-8", "Unicode", "ASCII", "OTHER"
};
#endregion
#region Methods.....
/// <summary>
/// 初始化 <see cref="IdentifyEncoding"/> 的实例
/// </summary>
public IdentifyEncoding()
{
Initialize_Frequencies();
}
#region GetEncodingName.....
/// <summary>
/// 从指定的 <see cref="Uri"/> 中判断编码类型
/// </summary>
/// <param name="testurl">要判断的 <see cref="Uri"/> </param>
/// <returns>返回编码类型("GB2312", "GBK", "HZ", "Big5", "CNS 11643", "ISO 2022CN", "UTF-8", "Unicode", "ASCII", "OTHER")</returns>
/// <example>
后面还有 2473 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。