public class EncodingDetect extends Object
| 限定符和类型 | 字段 | 说明 |
|---|---|---|
static int |
ASCII |
|
static int |
BIG5 |
|
static int |
CNS11643 |
|
static int |
CP949 |
|
boolean |
debug |
|
static int |
EUC_JP |
|
static int |
EUC_KR |
|
static int |
GB18030 |
|
static int |
GB2312 |
|
static int |
GBK |
|
static String[] |
htmlname |
|
static int |
HZ |
|
static int |
ISO2022CN |
|
static int |
ISO2022CN_CNS |
|
static int |
ISO2022CN_GB |
|
static int |
ISO2022JP |
|
static int |
ISO2022KR |
|
static String[] |
javaname |
|
static int |
JOHAB |
|
static String[] |
nicename |
|
static int |
OTHER |
|
static int |
SIMP |
|
static int |
SJIS |
|
static int |
TOTALTYPES |
|
static int |
TRAD |
|
static int |
UNICODE |
|
static int |
UNICODES |
|
static int |
UNICODET |
|
static int |
UTF8 |
|
static int |
UTF8S |
|
static int |
UTF8T |
| 构造器 | 说明 |
|---|---|
EncodingDetect() |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
int |
detectEncoding(byte[] rawtext) |
Function : detectEncoding Aruguments: byte array Returns : One of the
encodings from the Encoding enumeration (GB2312, HZ, BIG5, EUC_TW, ASCII,
or OTHER) Description: This function looks at the byte array and assigns
it a probability score for each encoding type.
|
int |
detectEncoding(File testfile) |
Function : detectEncoding Aruguments: File Returns : One of the encodings
from the Encoding enumeration (GB2312, HZ, BIG5, EUC_TW, ASCII, or OTHER)
Description: This function looks at the file and assigns it a probability
score for each encoding type.
|
int |
detectEncoding(URL testurl) |
Function : detectEncoding Aruguments: URL Returns : One of the encodings
from the Encoding enumeration (GB2312, HZ, BIG5, EUC_TW, ASCII, or OTHER)
Description: This function looks at the URL contents and assigns it a
probability score for each encoding type.
|
static void |
main(String[] argc) |
public boolean debug
public static int GB2312
public static int GBK
public static int GB18030
public static int HZ
public static int BIG5
public static int CNS11643
public static int UTF8
public static int UTF8T
public static int UTF8S
public static int UNICODE
public static int UNICODET
public static int UNICODES
public static int ISO2022CN
public static int ISO2022CN_CNS
public static int ISO2022CN_GB
public static int EUC_KR
public static int CP949
public static int ISO2022KR
public static int JOHAB
public static int SJIS
public static int EUC_JP
public static int ISO2022JP
public static int ASCII
public static int OTHER
public static int TOTALTYPES
public static final int SIMP
public static final int TRAD
public static String[] javaname
public static String[] nicename
public static String[] htmlname
public static void main(String[] argc)
public int detectEncoding(URL testurl)
public int detectEncoding(File testfile)
public int detectEncoding(byte[] rawtext)
Copyright © 2019. All rights reserved.