rchardet 0.9.9 → 1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rchardet.rb +61 -0
- data/lib/{chardet → rchardet}/big5freq.rb +0 -0
- data/lib/{chardet → rchardet}/big5prober.rb +0 -0
- data/lib/{chardet → rchardet}/chardistribution.rb +0 -0
- data/lib/{chardet → rchardet}/charsetgroupprober.rb +0 -0
- data/lib/{chardet → rchardet}/charsetprober.rb +0 -0
- data/lib/{chardet → rchardet}/codingstatemachine.rb +0 -0
- data/lib/{chardet → rchardet}/constants.rb +0 -0
- data/lib/{chardet → rchardet}/escprober.rb +0 -0
- data/lib/{chardet → rchardet}/escsm.rb +0 -0
- data/lib/{chardet → rchardet}/eucjpprober.rb +0 -0
- data/lib/{chardet → rchardet}/euckrfreq.rb +0 -0
- data/lib/{chardet → rchardet}/euckrprober.rb +0 -0
- data/lib/{chardet → rchardet}/euctwfreq.rb +0 -0
- data/lib/{chardet → rchardet}/euctwprober.rb +0 -0
- data/lib/{chardet → rchardet}/gb2312freq.rb +0 -0
- data/lib/{chardet → rchardet}/gb2312prober.rb +0 -0
- data/lib/{chardet → rchardet}/hebrewprober.rb +0 -0
- data/lib/{chardet → rchardet}/jisfreq.rb +0 -0
- data/lib/{chardet → rchardet}/jpcntx.rb +0 -0
- data/lib/{chardet → rchardet}/langbulgarianmodel.rb +0 -0
- data/lib/{chardet → rchardet}/langcyrillicmodel.rb +0 -0
- data/lib/{chardet → rchardet}/langgreekmodel.rb +0 -0
- data/lib/{chardet → rchardet}/langhebrewmodel.rb +0 -0
- data/lib/{chardet → rchardet}/langhungarianmodel.rb +0 -0
- data/lib/{chardet → rchardet}/langthaimodel.rb +0 -0
- data/lib/{chardet → rchardet}/latin1prober.rb +0 -0
- data/lib/{chardet → rchardet}/mbcharsetprober.rb +0 -0
- data/lib/{chardet → rchardet}/mbcsgroupprober.rb +0 -0
- data/lib/{chardet → rchardet}/mbcssm.rb +0 -0
- data/lib/{chardet → rchardet}/sbcharsetprober.rb +0 -0
- data/lib/{chardet → rchardet}/sbcsgroupprober.rb +0 -0
- data/lib/{chardet → rchardet}/sjisprober.rb +0 -0
- data/lib/{chardet → rchardet}/universaldetector.rb +0 -0
- data/lib/{chardet → rchardet}/utf8prober.rb +0 -0
- metadata +38 -38
- data/lib/chardet.rb +0 -61
data/lib/rchardet.rb
ADDED
@@ -0,0 +1,61 @@
|
|
1
|
+
######################## BEGIN LICENSE BLOCK ########################
|
2
|
+
# This library is free software; you can redistribute it and/or
|
3
|
+
# modify it under the terms of the GNU Lesser General Public
|
4
|
+
# License as published by the Free Software Foundation; either
|
5
|
+
# version 2.1 of the License, or (at your option) any later version.
|
6
|
+
#
|
7
|
+
# This library is distributed in the hope that it will be useful,
|
8
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
9
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
10
|
+
# Lesser General Public License for more details.
|
11
|
+
#
|
12
|
+
# You should have received a copy of the GNU Lesser General Public
|
13
|
+
# License along with this library; if not, write to the Free Software
|
14
|
+
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
15
|
+
# 02110-1301 USA
|
16
|
+
######################### END LICENSE BLOCK #########################
|
17
|
+
require 'rchardet/charsetprober'
|
18
|
+
require 'rchardet/mbcharsetprober'
|
19
|
+
|
20
|
+
require 'rchardet/big5freq'
|
21
|
+
require 'rchardet/big5prober'
|
22
|
+
require 'rchardet/chardistribution'
|
23
|
+
require 'rchardet/charsetgroupprober'
|
24
|
+
|
25
|
+
require 'rchardet/codingstatemachine'
|
26
|
+
require 'rchardet/constants'
|
27
|
+
require 'rchardet/escprober'
|
28
|
+
require 'rchardet/escsm'
|
29
|
+
require 'rchardet/eucjpprober'
|
30
|
+
require 'rchardet/euckrfreq'
|
31
|
+
require 'rchardet/euckrprober'
|
32
|
+
require 'rchardet/euctwfreq'
|
33
|
+
require 'rchardet/euctwprober'
|
34
|
+
require 'rchardet/gb2312freq'
|
35
|
+
require 'rchardet/gb2312prober'
|
36
|
+
require 'rchardet/hebrewprober'
|
37
|
+
require 'rchardet/jisfreq'
|
38
|
+
require 'rchardet/jpcntx'
|
39
|
+
require 'rchardet/langbulgarianmodel'
|
40
|
+
require 'rchardet/langcyrillicmodel'
|
41
|
+
require 'rchardet/langgreekmodel'
|
42
|
+
require 'rchardet/langhebrewmodel'
|
43
|
+
require 'rchardet/langhungarianmodel'
|
44
|
+
require 'rchardet/langthaimodel'
|
45
|
+
require 'rchardet/latin1prober'
|
46
|
+
|
47
|
+
require 'rchardet/mbcsgroupprober'
|
48
|
+
require 'rchardet/mbcssm'
|
49
|
+
require 'rchardet/sbcharsetprober'
|
50
|
+
require 'rchardet/sbcsgroupprober'
|
51
|
+
require 'rchardet/sjisprober'
|
52
|
+
require 'rchardet/universaldetector'
|
53
|
+
require 'rchardet/utf8prober'
|
54
|
+
include CharDet
|
55
|
+
def CharDet.detect(aBuf)
|
56
|
+
u = UniversalDetector.new
|
57
|
+
u.reset
|
58
|
+
u.feed(aBuf)
|
59
|
+
u.close
|
60
|
+
return u.result
|
61
|
+
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.0
|
|
3
3
|
specification_version: 1
|
4
4
|
name: rchardet
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0
|
7
|
-
date: 2007-03
|
6
|
+
version: "1.0"
|
7
|
+
date: 2007-04-03 00:00:00 -04:00
|
8
8
|
summary: Character encoding auto-detection in Ruby
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -29,42 +29,42 @@ post_install_message:
|
|
29
29
|
authors:
|
30
30
|
- Jeff Hodges
|
31
31
|
files:
|
32
|
-
- lib/
|
33
|
-
- lib/
|
34
|
-
- lib/
|
35
|
-
- lib/
|
36
|
-
- lib/
|
37
|
-
- lib/
|
38
|
-
- lib/
|
39
|
-
- lib/
|
40
|
-
- lib/
|
41
|
-
- lib/
|
42
|
-
- lib/
|
43
|
-
- lib/
|
44
|
-
- lib/
|
45
|
-
- lib/
|
46
|
-
- lib/
|
47
|
-
- lib/
|
48
|
-
- lib/
|
49
|
-
- lib/
|
50
|
-
- lib/
|
51
|
-
- lib/
|
52
|
-
- lib/
|
53
|
-
- lib/
|
54
|
-
- lib/
|
55
|
-
- lib/
|
56
|
-
- lib/
|
57
|
-
- lib/
|
58
|
-
- lib/
|
59
|
-
- lib/
|
60
|
-
- lib/
|
61
|
-
- lib/
|
62
|
-
- lib/
|
63
|
-
- lib/
|
64
|
-
- lib/
|
65
|
-
- lib/
|
66
|
-
- lib/
|
67
|
-
- lib/
|
32
|
+
- lib/rchardet
|
33
|
+
- lib/rchardet.rb
|
34
|
+
- lib/rchardet/big5freq.rb
|
35
|
+
- lib/rchardet/big5prober.rb
|
36
|
+
- lib/rchardet/chardistribution.rb
|
37
|
+
- lib/rchardet/charsetgroupprober.rb
|
38
|
+
- lib/rchardet/charsetprober.rb
|
39
|
+
- lib/rchardet/codingstatemachine.rb
|
40
|
+
- lib/rchardet/constants.rb
|
41
|
+
- lib/rchardet/escprober.rb
|
42
|
+
- lib/rchardet/escsm.rb
|
43
|
+
- lib/rchardet/eucjpprober.rb
|
44
|
+
- lib/rchardet/euckrfreq.rb
|
45
|
+
- lib/rchardet/euckrprober.rb
|
46
|
+
- lib/rchardet/euctwfreq.rb
|
47
|
+
- lib/rchardet/euctwprober.rb
|
48
|
+
- lib/rchardet/gb2312freq.rb
|
49
|
+
- lib/rchardet/gb2312prober.rb
|
50
|
+
- lib/rchardet/hebrewprober.rb
|
51
|
+
- lib/rchardet/jisfreq.rb
|
52
|
+
- lib/rchardet/jpcntx.rb
|
53
|
+
- lib/rchardet/langbulgarianmodel.rb
|
54
|
+
- lib/rchardet/langcyrillicmodel.rb
|
55
|
+
- lib/rchardet/langgreekmodel.rb
|
56
|
+
- lib/rchardet/langhebrewmodel.rb
|
57
|
+
- lib/rchardet/langhungarianmodel.rb
|
58
|
+
- lib/rchardet/langthaimodel.rb
|
59
|
+
- lib/rchardet/latin1prober.rb
|
60
|
+
- lib/rchardet/mbcharsetprober.rb
|
61
|
+
- lib/rchardet/mbcsgroupprober.rb
|
62
|
+
- lib/rchardet/mbcssm.rb
|
63
|
+
- lib/rchardet/sbcharsetprober.rb
|
64
|
+
- lib/rchardet/sbcsgroupprober.rb
|
65
|
+
- lib/rchardet/sjisprober.rb
|
66
|
+
- lib/rchardet/universaldetector.rb
|
67
|
+
- lib/rchardet/utf8prober.rb
|
68
68
|
- COPYING
|
69
69
|
test_files: []
|
70
70
|
|
data/lib/chardet.rb
DELETED
@@ -1,61 +0,0 @@
|
|
1
|
-
######################## BEGIN LICENSE BLOCK ########################
|
2
|
-
# This library is free software; you can redistribute it and/or
|
3
|
-
# modify it under the terms of the GNU Lesser General Public
|
4
|
-
# License as published by the Free Software Foundation; either
|
5
|
-
# version 2.1 of the License, or (at your option) any later version.
|
6
|
-
#
|
7
|
-
# This library is distributed in the hope that it will be useful,
|
8
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
9
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
10
|
-
# Lesser General Public License for more details.
|
11
|
-
#
|
12
|
-
# You should have received a copy of the GNU Lesser General Public
|
13
|
-
# License along with this library; if not, write to the Free Software
|
14
|
-
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
15
|
-
# 02110-1301 USA
|
16
|
-
######################### END LICENSE BLOCK #########################
|
17
|
-
require 'chardet/charsetprober'
|
18
|
-
require 'chardet/mbcharsetprober'
|
19
|
-
|
20
|
-
require 'chardet/big5freq'
|
21
|
-
require 'chardet/big5prober'
|
22
|
-
require 'chardet/chardistribution'
|
23
|
-
require 'chardet/charsetgroupprober'
|
24
|
-
|
25
|
-
require 'chardet/codingstatemachine'
|
26
|
-
require 'chardet/constants'
|
27
|
-
require 'chardet/escprober'
|
28
|
-
require 'chardet/escsm'
|
29
|
-
require 'chardet/eucjpprober'
|
30
|
-
require 'chardet/euckrfreq'
|
31
|
-
require 'chardet/euckrprober'
|
32
|
-
require 'chardet/euctwfreq'
|
33
|
-
require 'chardet/euctwprober'
|
34
|
-
require 'chardet/gb2312freq'
|
35
|
-
require 'chardet/gb2312prober'
|
36
|
-
require 'chardet/hebrewprober'
|
37
|
-
require 'chardet/jisfreq'
|
38
|
-
require 'chardet/jpcntx'
|
39
|
-
require 'chardet/langbulgarianmodel'
|
40
|
-
require 'chardet/langcyrillicmodel'
|
41
|
-
require 'chardet/langgreekmodel'
|
42
|
-
require 'chardet/langhebrewmodel'
|
43
|
-
require 'chardet/langhungarianmodel'
|
44
|
-
require 'chardet/langthaimodel'
|
45
|
-
require 'chardet/latin1prober'
|
46
|
-
|
47
|
-
require 'chardet/mbcsgroupprober'
|
48
|
-
require 'chardet/mbcssm'
|
49
|
-
require 'chardet/sbcharsetprober'
|
50
|
-
require 'chardet/sbcsgroupprober'
|
51
|
-
require 'chardet/sjisprober'
|
52
|
-
require 'chardet/universaldetector'
|
53
|
-
require 'chardet/utf8prober'
|
54
|
-
include CharDet
|
55
|
-
def CharDet.detect(aBuf)
|
56
|
-
u = UniversalDetector.new
|
57
|
-
u.reset
|
58
|
-
u.feed(aBuf)
|
59
|
-
u.close
|
60
|
-
return u.result
|
61
|
-
end
|