You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
679 B
32 lines
679 B
4 years ago
|
using System;
|
||
|
using System.Collections.Generic;
|
||
|
using System.Linq;
|
||
|
using System.Text;
|
||
|
|
||
|
namespace Common.TextUtil
|
||
|
{
|
||
|
public static class EncodingHelper
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// 获取gb2312字符编码
|
||
|
/// </summary>
|
||
|
/// <returns></returns>
|
||
|
public static Encoding GetGB2312Encoding()
|
||
|
{
|
||
|
return Encoding.GetEncoding("gb2312");
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 获取gb2312字符编码
|
||
|
/// </summary>
|
||
|
/// <returns></returns>
|
||
|
public static Encoding GB2312
|
||
|
{
|
||
|
get
|
||
|
{
|
||
|
return Encoding.GetEncoding("gb2312");
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|