mail-jdec 1.0.6 → 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/mail/jdec.rb +1 -1
- data/lib/mail/jdec/decoder.rb +4 -1
- data/lib/mail/jdec/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 771926a9ac210b89bde65b6a6081baa75cfe1cc18ef51a7e549615c2760be0bb
|
4
|
+
data.tar.gz: 21bf2742a6b42daeb24da45d7a60a2eb09e6f7ce278ebd4b38d7203f8d97b1e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e6e9f45f57696da4535d8cff239de15b7a4e2b907043595165e2176392c4ae6b57d650e9759157601a414c17e0142fc3cb2628a7c08713515c9e37a0d15b937
|
7
|
+
data.tar.gz: 7a150a01169bc9f17e784a22bb0978ebdb3c61d02f7c6155dd252ebe97b271fbe2f9a9817e31fd9a450f7b287a20b85445b3485a0e84baa208e6843e793df206
|
data/CHANGELOG.md
CHANGED
data/lib/mail/jdec.rb
CHANGED
data/lib/mail/jdec/decoder.rb
CHANGED
@@ -6,9 +6,12 @@ module Mail
|
|
6
6
|
return text if text.nil? || text.encoding == Encoding::UTF_8
|
7
7
|
|
8
8
|
detected = Detector.detect(text)
|
9
|
+
|
9
10
|
if detected
|
10
11
|
charset = detected[:encoding].to_s
|
11
|
-
text = Mail::Encodings.transcode_charset(text.dup.force_encoding(charset), charset)
|
12
|
+
text = Mail::Encodings.transcode_charset(text.dup.force_encoding(charset), charset, 'utf-8')
|
13
|
+
else
|
14
|
+
text = Mail::Encodings.transcode_charset(text, text.encoding, 'us-ascii')
|
12
15
|
end
|
13
16
|
|
14
17
|
text
|
data/lib/mail/jdec/version.rb
CHANGED