Bug #1993

httpGet/httpReq can't handle content="text/html; charset=windows-1251"

Added by Leonid Protasov about 7 years ago. Updated about 7 years ago.

Status:FixedStart date:02/16/2014
Priority:NormalDue date:
Assignee:Andreas Smas% Done:

100%

Category:Plugins
Target version:4.6
Found in version:Latest Platform:Linux

Description

I'm trying:

var response = showtime.httpGet('http://btvm.biz/RUSS/').toString();
or
var response = showtime.httpReq('http://btvm.biz/RUSS/').toString();

But I get:
TypeError: malformed UTF-8 character sequence at offset 3681

Associated revisions

Revision 1b5a3407
Added by Andreas Smas about 7 years ago

js: If all else fails, try to extract character encoding from <meta> tags

Fixes #1993

Change included in version 4.5.146

History

#1 Updated by Leonid Protasov about 7 years ago

  • Subject changed from TypeError: malformed UTF-8 character sequence at some html pages in JS to httpGet/httpReq can't handle content="text/html; charset=windows-1251"

#3 Updated by Andreas Smas about 7 years ago

  • Priority changed from High to Normal

#4 Updated by Andreas Smas about 7 years ago

Showtime does not parse any HTML in the http requests at all.

Not sure how the best way to fix this is.

#5 Updated by Andreas Smas about 7 years ago

  • Status changed from New to Fixed
  • % Done changed from 0 to 100

Applied in changeset git|commit:1b5a34073bb4a1b0dc0c3c5a5cff60c4a770d03c.

Also available in: Atom PDF