wcc 2.3.0 → 2.3.1
Sign up to get free protection for your applications and to get access to all the features.
- 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