We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 01637a3 commit 67736b0Copy full SHA for 67736b0
1 file changed
index.js
@@ -8,7 +8,7 @@ var charsetRegex = /charset=["]*([^>"\s]+)/i
8
9
module.exports = function ensureUTF8 (binaryBuffer, contentType) {
10
var encoding = getEncoding(binaryBuffer, contentType)
11
-
+
12
return encoding === 'utf8'
13
? binaryBuffer.toString('utf8')
14
: iconv.decode(binaryBuffer, encoding).replace(charsetRegex, 'utf-8')
@@ -20,5 +20,5 @@ function getEncoding (content, contentType) {
20
21
function inferredEncoding(content) {
22
var charset = jschardet.detect(content);
23
- return charset && charset.encoding && charset.encoding
24
-}
+ return charset && charset.encoding
+}
0 commit comments