wcc 2.3.0 → 2.3.1
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/lib/wcc.rb +1 -1
- data/lib/wcc/version.rb +1 -1
- metadata +3 -3
data/lib/wcc.rb
CHANGED
@@ -611,7 +611,7 @@ module WCC
|
|
611
611
|
# detect encoding from http header, meta element, default utf-8
|
612
612
|
# do not use utf-8 regex because it will fail on non utf-8 pages
|
613
613
|
encoding = (res['content-type'].to_s.match(/;\s*charset=([A-Za-z0-9-]*)/i).to_a[1] ||
|
614
|
-
res.body.match(/<meta.*charset=([a-zA-Z0-9-]*).*/i).to_a[1]).to_s.downcase || 'utf-8'
|
614
|
+
res.body.match(/<meta.*charset="?([a-zA-Z0-9-]*).*/i).to_a[1]).to_s.downcase || 'utf-8'
|
615
615
|
WCC.logger.info "Encoding is '#{encoding}'"
|
616
616
|
# convert to utf-8
|
617
617
|
begin
|
data/lib/wcc/version.rb
CHANGED
metadata
CHANGED