Permalink
Browse files

Force utf8

  • Loading branch information...
1 parent 6e0e393 commit ff8c880e2246fbbf9b4a5a0724bacae8d223e63c amix committed Jul 17, 2014
Showing with 4 additions and 1 deletion.
  1. +1 −1 package.json
  2. +3 −0 src/webpage-info.coffee
View
@@ -3,7 +3,7 @@
"description": "Return a webpage's title and favicon.",
"keywords": ["oembed", "preview"],
"author": "amix",
- "version": "0.0.2",
+ "version": "0.0.3",
"dependencies": {
"request": ">=2.34.0"
},
View
@@ -4,9 +4,12 @@ RE_TITLE = /<title>(.+?)<\/title>/i
exports.parse = (url, callback, timeout) ->
timeout = timeout or 5000
+
args = {"url": url, "timeout": timeout}
request(args, (error, response, body) ->
+ body = body.toString("utf8")
+
if error or response.statusCode != 200
callback({'error': error})
else

0 comments on commit ff8c880

Please sign in to comment.