cmess 0.1.2.288 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/ChangeLog +4 -0
- data/README +10 -1
- data/lib/cmess/cli.rb +7 -7
- data/lib/cmess/guess_encoding/automatic.rb +8 -6
- data/lib/cmess/version.rb +3 -3
- metadata +43 -45
data/ChangeLog
CHANGED
data/README
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
== VERSION
|
4
4
|
|
5
|
-
This documentation refers to cmess version 0.
|
5
|
+
This documentation refers to cmess version 0.2.0
|
6
6
|
|
7
7
|
|
8
8
|
== DESCRIPTION
|
@@ -24,6 +24,15 @@ decode_entities:: Decode HTML entities in a string.
|
|
24
24
|
TODO: well, more of the description... ;-)
|
25
25
|
|
26
26
|
|
27
|
+
== LINKS
|
28
|
+
|
29
|
+
<b></b>
|
30
|
+
Documentation:: <http://prometheus.rubyforge.org/cmess>
|
31
|
+
Source code (old):: <http://prometheus.rubyforge.org/svn/scratch/cmess>
|
32
|
+
Source code:: <http://github.com/blackwinter/cmess>
|
33
|
+
Rubyforge project:: <http://rubyforge.org/projects/prometheus>
|
34
|
+
|
35
|
+
|
27
36
|
== AUTHORS
|
28
37
|
|
29
38
|
* Jens Wille <mailto:jens.wille@uni-koeln.de>
|
data/lib/cmess/cli.rb
CHANGED
@@ -3,9 +3,9 @@
|
|
3
3
|
# #
|
4
4
|
# A component of cmess, the encoding tool-box. #
|
5
5
|
# #
|
6
|
-
# Copyright (C) 2007 University of Cologne,
|
7
|
-
#
|
8
|
-
#
|
6
|
+
# Copyright (C) 2007-2009 University of Cologne, #
|
7
|
+
# Albertus-Magnus-Platz, #
|
8
|
+
# 50932 Cologne, Germany #
|
9
9
|
# #
|
10
10
|
# Authors: #
|
11
11
|
# Jens Wille <jens.wille@uni-koeln.de> #
|
@@ -51,10 +51,10 @@ module CMess::CLI
|
|
51
51
|
def open_file_or_std(file, mode = 'r')
|
52
52
|
if file == '-'
|
53
53
|
case mode
|
54
|
-
when 'r'
|
55
|
-
when 'w'
|
56
|
-
when 'a'
|
57
|
-
else
|
54
|
+
when 'r' then STDIN
|
55
|
+
when 'w' then STDOUT
|
56
|
+
when 'a' then STDERR
|
57
|
+
else raise ArgumentError, "don't know how to handle mode '#{mode}'"
|
58
58
|
end
|
59
59
|
else
|
60
60
|
ensure_readable(file) unless mode == 'w'
|
@@ -1,9 +1,11 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
1
3
|
#--
|
2
4
|
###############################################################################
|
3
5
|
# #
|
4
6
|
# A component of cmess, the encoding tool-box. #
|
5
7
|
# #
|
6
|
-
# Copyright (C) 2007-
|
8
|
+
# Copyright (C) 2007-2009 University of Cologne, #
|
7
9
|
# Albertus-Magnus-Platz, #
|
8
10
|
# 50932 Cologne, Germany #
|
9
11
|
# #
|
@@ -30,7 +32,7 @@
|
|
30
32
|
###############################################################################
|
31
33
|
#++
|
32
34
|
|
33
|
-
$KCODE = 'u'
|
35
|
+
$KCODE = 'u' unless RUBY_VERSION >= '1.9'
|
34
36
|
|
35
37
|
require 'yaml'
|
36
38
|
require 'iconv'
|
@@ -262,10 +264,10 @@ class CMess::GuessEncoding::Automatic
|
|
262
264
|
encodings UTF_16BE, UTF_16LE, UTF_16 do
|
263
265
|
if relative_byte_count(byte_count[0]) > 0.25
|
264
266
|
case first_byte
|
265
|
-
when 0x0
|
266
|
-
when 0xfe
|
267
|
-
when 0xff
|
268
|
-
else
|
267
|
+
when 0x0 then UTF_32
|
268
|
+
when 0xfe then UTF_16BE
|
269
|
+
when 0xff then UTF_16LE
|
270
|
+
else UTF_16
|
269
271
|
end
|
270
272
|
end
|
271
273
|
end
|
data/lib/cmess/version.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
# #
|
4
4
|
# A component of cmess, the encoding tool-box. #
|
5
5
|
# #
|
6
|
-
# Copyright (C) 2007-
|
6
|
+
# Copyright (C) 2007-2009 University of Cologne, #
|
7
7
|
# Albertus-Magnus-Platz, #
|
8
8
|
# 50932 Cologne, Germany #
|
9
9
|
# #
|
@@ -29,8 +29,8 @@
|
|
29
29
|
module CMess::Version
|
30
30
|
|
31
31
|
MAJOR = 0
|
32
|
-
MINOR =
|
33
|
-
TINY =
|
32
|
+
MINOR = 2
|
33
|
+
TINY = 0
|
34
34
|
|
35
35
|
class << self
|
36
36
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cmess
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jens Wille
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date:
|
12
|
+
date: 2009-05-08 00:00:00 +02:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -32,13 +32,13 @@ dependencies:
|
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: "0"
|
34
34
|
version:
|
35
|
-
description: "Assist with handling messed up encodings (Currently includes the
|
35
|
+
description: "\n Assist with handling messed up encodings (Currently includes the\n following tools: bconv, cinderella, decode_entities, guess_encoding)\n "
|
36
36
|
email: jens.wille@uni-koeln.de
|
37
37
|
executables:
|
38
|
+
- guess_encoding
|
38
39
|
- cinderella
|
39
40
|
- bconv
|
40
41
|
- decode_entities
|
41
|
-
- guess_encoding
|
42
42
|
extensions: []
|
43
43
|
|
44
44
|
extra_rdoc_files:
|
@@ -46,71 +46,69 @@ extra_rdoc_files:
|
|
46
46
|
- ChangeLog
|
47
47
|
- README
|
48
48
|
files:
|
49
|
-
- lib/cmess.rb
|
50
|
-
- lib/cmess/bconv.rb
|
51
|
-
- lib/cmess/version.rb
|
52
|
-
- lib/cmess/guess_encoding.rb
|
53
|
-
- lib/cmess/cli.rb
|
54
|
-
- lib/cmess/cinderella.rb
|
55
|
-
- lib/cmess/decode_entities.rb
|
56
49
|
- lib/cmess/guess_encoding/manual.rb
|
57
|
-
- lib/cmess/guess_encoding/encoding.rb
|
58
50
|
- lib/cmess/guess_encoding/automatic.rb
|
51
|
+
- lib/cmess/guess_encoding/encoding.rb
|
52
|
+
- lib/cmess/decode_entities.rb
|
53
|
+
- lib/cmess/cli.rb
|
54
|
+
- lib/cmess/cinderella.rb
|
55
|
+
- lib/cmess/bconv.rb
|
56
|
+
- lib/cmess/guess_encoding.rb
|
57
|
+
- lib/cmess/version.rb
|
58
|
+
- lib/cmess.rb
|
59
|
+
- bin/guess_encoding
|
59
60
|
- bin/cinderella
|
60
61
|
- bin/bconv
|
61
62
|
- bin/decode_entities
|
62
|
-
-
|
63
|
+
- Rakefile
|
63
64
|
- COPYING
|
64
|
-
- README
|
65
65
|
- ChangeLog
|
66
|
-
-
|
67
|
-
- example/
|
68
|
-
- example/cinderella/crop
|
69
|
-
- example/cinderella/empty6-slash.txt
|
70
|
-
- example/cinderella/pot
|
71
|
-
- example/cinderella/crop_repaired
|
72
|
-
- example/cinderella/empty6-slash_repaired.txt
|
73
|
-
- example/guess_encoding
|
74
|
-
- example/guess_encoding/de.utf-8.txt
|
66
|
+
- README
|
67
|
+
- example/guess_encoding/en.utf-8.txt
|
75
68
|
- example/guess_encoding/fr.utf-8.txt
|
76
69
|
- example/guess_encoding/check_results
|
77
|
-
- example/guess_encoding/en.utf-8.txt
|
78
70
|
- example/guess_encoding/it.utf-8.txt
|
79
|
-
-
|
80
|
-
-
|
81
|
-
-
|
82
|
-
-
|
83
|
-
-
|
84
|
-
-
|
85
|
-
- data/
|
86
|
-
- data/csets/unicode/latin_extended_additional.yaml
|
87
|
-
- data/csets/unicode/cyrillic-supplement.yaml
|
88
|
-
- data/csets/unicode/spacing_modifier_letters.yaml
|
89
|
-
- data/csets/unicode/letterlike_symbols.yaml
|
90
|
-
- data/csets/unicode/greek.yaml
|
71
|
+
- example/guess_encoding/de.utf-8.txt
|
72
|
+
- example/cinderella/pot
|
73
|
+
- example/cinderella/empty6-slash_repaired.txt
|
74
|
+
- example/cinderella/crop
|
75
|
+
- example/cinderella/empty6-slash.txt
|
76
|
+
- example/cinderella/crop_repaired
|
77
|
+
- data/chartab.yaml
|
91
78
|
- data/csets/unicode/latin-extended-c.yaml
|
92
|
-
- data/csets/unicode/
|
93
|
-
- data/csets/unicode/latin-extended-d.yaml
|
79
|
+
- data/csets/unicode/spacing_modifier_letters.yaml
|
94
80
|
- data/csets/unicode/latin_extended_a.yaml
|
95
|
-
- data/csets/unicode/
|
81
|
+
- data/csets/unicode/ipa_extensions.yaml
|
96
82
|
- data/csets/unicode/latin_1_supplement.yaml
|
83
|
+
- data/csets/unicode/greek.yaml
|
84
|
+
- data/csets/unicode/latin_extended_b.yaml
|
85
|
+
- data/csets/unicode/latin-extended-d.yaml
|
97
86
|
- data/csets/unicode/basic_latin.yaml
|
87
|
+
- data/csets/unicode/latin_extended_additional.yaml
|
98
88
|
- data/csets/unicode/cyrillic.yaml
|
89
|
+
- data/csets/unicode/cyrillic-supplement.yaml
|
90
|
+
- data/csets/unicode/letterlike_symbols.yaml
|
91
|
+
- data/csets/iso_8859-1.yaml
|
92
|
+
- data/csets/utf8.yaml
|
93
|
+
- data/csets/utf-8.yaml
|
94
|
+
- data/csets/latin1.yaml
|
95
|
+
- data/csets/iso_8859-15.yaml
|
99
96
|
- data/test_chars.yaml
|
100
|
-
- data/chartab.yaml
|
101
97
|
has_rdoc: true
|
102
98
|
homepage: http://prometheus.rubyforge.org/cmess
|
99
|
+
licenses: []
|
100
|
+
|
103
101
|
post_install_message:
|
104
102
|
rdoc_options:
|
103
|
+
- --all
|
104
|
+
- --main
|
105
|
+
- README
|
105
106
|
- --line-numbers
|
106
107
|
- --inline-source
|
107
108
|
- --title
|
108
109
|
- cmess Application documentation
|
109
110
|
- --charset
|
110
111
|
- UTF-8
|
111
|
-
- --main
|
112
|
-
- README
|
113
|
-
- --all
|
114
112
|
require_paths:
|
115
113
|
- lib
|
116
114
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -128,9 +126,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
128
126
|
requirements: []
|
129
127
|
|
130
128
|
rubyforge_project: prometheus
|
131
|
-
rubygems_version: 1.
|
129
|
+
rubygems_version: 1.3.3
|
132
130
|
signing_key:
|
133
|
-
specification_version:
|
131
|
+
specification_version: 3
|
134
132
|
summary: "Assist with handling messed up encodings (Currently includes the following tools: bconv, cinderella, decode_entities, guess_encoding)"
|
135
133
|
test_files: []
|
136
134
|
|