epub_book 0.1.26 → 0.1.27
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/epub_book/book.rb +1 -1
- data/lib/epub_book/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: a433512f6b0c69b388fd5071ef442edf6e07aa0755872a61f9a03896f7dd354b
|
4
|
+
data.tar.gz: 6ffb8b8863f2670bc07718f98bacba13be44faab8c775737777403944f7fae5c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 13097be5e90b59a7c3d02cdb1a8eb12bf05afa01739523a279893e7c34ed44935f930064f518010fa80223db982ace912aacfbfe1c786a0ddbbf36843d0565e1
|
7
|
+
data.tar.gz: 0b158bd9956551cccea116ff4fa60a0455de9d2ebd2753446af102228e4693cb5e5ad5903aab9bdd157274a7bb4ad3ad631814dc885396268c3b5ebc3654d06e
|
data/lib/epub_book/book.rb
CHANGED
@@ -227,7 +227,7 @@ module EpubBook
|
|
227
227
|
#/<meta.*?charset\s*=[\s\"\']?utf-8/i =~ str ? str : str.force_encoding('gbk').encode!('utf-8',invalid: :replace, undef: :replace)
|
228
228
|
|
229
229
|
str.scrub!('') unless str.valid_encoding?
|
230
|
-
str.encode!('utf-8') if str.encoding.name != 'UTF-8'
|
230
|
+
str.encode!('utf-8', invalid: :replace, undef: :replace, replace: '------') if str.encoding.name != 'UTF-8'
|
231
231
|
|
232
232
|
EpubBook.logger.info "-------encode 后 #{str.encoding}"
|
233
233
|
str
|
data/lib/epub_book/version.rb
CHANGED