mail-iso-2022-jp 1.0.7 → 1.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +4 -6
- data/Rakefile +3 -3
- data/lib/mail-iso-2022-jp/patches.rb +8 -4
- metadata +49 -25
data/README.md
CHANGED
@@ -106,11 +106,9 @@ or run this command:
|
|
106
106
|
Remarks
|
107
107
|
-------
|
108
108
|
|
109
|
-
*
|
110
|
-
*
|
111
|
-
|
112
|
-
* 波ダッシュ(U+301C)は、iso-2022-jpへの変換前に全角チルダ(U+FF5E)で置き換えられます。
|
113
|
-
* `髙` や `﨑` といった特殊文字がメールヘッダにある場合は、正しく扱えません。これはTODO項目です。
|
109
|
+
* `①` などのNEC特殊文字や `髙` や `﨑` といったIBM拡張文字を件名、宛先、本文などに含めることができます。
|
110
|
+
* 全角ダッシュ(U+FF5E)は波ダッシュ(U+301C)に変換されます。
|
111
|
+
* 半角カタカナは全角カタカナに変換されます。
|
114
112
|
|
115
113
|
|
116
114
|
References
|
@@ -120,7 +118,7 @@ References
|
|
120
118
|
* http://d.hatena.ne.jp/rudeboyjet/20100605/p1
|
121
119
|
* http://d.hatena.ne.jp/hichiriki/20101026#1288107706
|
122
120
|
* http://d.hatena.ne.jp/deeeki/20111003/rails3_mailer_iso2022jp
|
123
|
-
|
121
|
+
* http://d.hatena.ne.jp/tmtms/20090611/1244724573
|
124
122
|
|
125
123
|
License
|
126
124
|
-------
|
data/Rakefile
CHANGED
@@ -5,7 +5,7 @@ require 'rdoc/task'
|
|
5
5
|
desc 'Default: run unit tests.'
|
6
6
|
task :default => :test
|
7
7
|
|
8
|
-
desc 'Test
|
8
|
+
desc 'Test mail-iso-2022-jp library.'
|
9
9
|
Rake::TestTask.new(:test) do |t|
|
10
10
|
t.libs << 'lib'
|
11
11
|
t.libs << 'test'
|
@@ -13,10 +13,10 @@ Rake::TestTask.new(:test) do |t|
|
|
13
13
|
t.verbose = true
|
14
14
|
end
|
15
15
|
|
16
|
-
desc 'Generate documentation for the
|
16
|
+
desc 'Generate documentation for the mail-iso-2022-jp library.'
|
17
17
|
RDoc::Task.new(:rdoc) do |rdoc|
|
18
18
|
rdoc.rdoc_dir = 'rdoc'
|
19
|
-
rdoc.title = '
|
19
|
+
rdoc.title = 'MailIso2022Jp'
|
20
20
|
rdoc.options << '--line-numbers' << '--inline-source'
|
21
21
|
rdoc.rdoc_files.include('README')
|
22
22
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
@@ -40,10 +40,14 @@ module Mail
|
|
40
40
|
def initialize_with_iso_2022_jp_encoding(value = nil, charset = 'utf-8')
|
41
41
|
if charset.to_s.downcase == 'iso-2022-jp'
|
42
42
|
value.gsub!(/#{WAVE_DASH}/, FULLWIDTH_TILDE)
|
43
|
-
value = NKF.nkf('--
|
44
|
-
|
45
|
-
|
46
|
-
|
43
|
+
value = NKF.nkf('--oc=CP50220 -j', value)
|
44
|
+
if RUBY_VERSION >= '1.9'
|
45
|
+
value.force_encoding('ascii-8bit')
|
46
|
+
value = b_value_encode(value)
|
47
|
+
value.force_encoding('ascii-8bit')
|
48
|
+
else
|
49
|
+
value = b_value_encode(value)
|
50
|
+
end
|
47
51
|
end
|
48
52
|
initialize_without_iso_2022_jp_encoding(value, charset)
|
49
53
|
end
|
metadata
CHANGED
@@ -1,34 +1,48 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: mail-iso-2022-jp
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 7
|
5
5
|
prerelease:
|
6
|
+
segments:
|
7
|
+
- 1
|
8
|
+
- 0
|
9
|
+
- 8
|
10
|
+
version: 1.0.8
|
6
11
|
platform: ruby
|
7
|
-
authors:
|
12
|
+
authors:
|
8
13
|
- Kohei MATSUSHITA
|
9
14
|
- Tsutomu KURODA
|
10
15
|
autorequire:
|
11
16
|
bindir: bin
|
12
17
|
cert_chain: []
|
13
|
-
|
14
|
-
|
15
|
-
|
18
|
+
|
19
|
+
date: 2011-11-20 00:00:00 Z
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
16
22
|
name: mail
|
17
|
-
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
18
25
|
none: false
|
19
|
-
requirements:
|
20
|
-
- -
|
21
|
-
- !ruby/object:Gem::Version
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: 13
|
30
|
+
segments:
|
31
|
+
- 2
|
32
|
+
- 2
|
33
|
+
- 5
|
22
34
|
version: 2.2.5
|
23
35
|
type: :runtime
|
24
|
-
|
25
|
-
version_requirements: *21574180
|
36
|
+
version_requirements: *id001
|
26
37
|
description: A patch that provides 'mail' gem with iso-2022-jp conversion capability.
|
27
38
|
email: hermes@oiax.jp
|
28
39
|
executables: []
|
40
|
+
|
29
41
|
extensions: []
|
42
|
+
|
30
43
|
extra_rdoc_files: []
|
31
|
-
|
44
|
+
|
45
|
+
files:
|
32
46
|
- README.md
|
33
47
|
- Gemfile
|
34
48
|
- Rakefile
|
@@ -36,26 +50,36 @@ files:
|
|
36
50
|
- lib/mail-iso-2022-jp/patches.rb
|
37
51
|
homepage: http://github.com/kuroda/mail-iso-2022-jp
|
38
52
|
licenses: []
|
53
|
+
|
39
54
|
post_install_message:
|
40
55
|
rdoc_options: []
|
41
|
-
|
56
|
+
|
57
|
+
require_paths:
|
42
58
|
- lib
|
43
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
59
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
44
60
|
none: false
|
45
|
-
requirements:
|
46
|
-
- -
|
47
|
-
- !ruby/object:Gem::Version
|
48
|
-
|
49
|
-
|
61
|
+
requirements:
|
62
|
+
- - ">="
|
63
|
+
- !ruby/object:Gem::Version
|
64
|
+
hash: 3
|
65
|
+
segments:
|
66
|
+
- 0
|
67
|
+
version: "0"
|
68
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
50
69
|
none: false
|
51
|
-
requirements:
|
52
|
-
- -
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
|
70
|
+
requirements:
|
71
|
+
- - ">="
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
hash: 3
|
74
|
+
segments:
|
75
|
+
- 0
|
76
|
+
version: "0"
|
55
77
|
requirements: []
|
78
|
+
|
56
79
|
rubyforge_project:
|
57
80
|
rubygems_version: 1.8.10
|
58
81
|
signing_key:
|
59
82
|
specification_version: 3
|
60
83
|
summary: A patch that provides 'mail' gem with iso-2022-jp conversion capability.
|
61
84
|
test_files: []
|
85
|
+
|