Skip to content

Commit

Permalink
Increasing size of buffer for first encoding guess
Browse files Browse the repository at this point in the history
Addresses #7
  • Loading branch information
yishn committed Mar 12, 2020
1 parent ba02cce commit 3766246
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tokenize.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ exports.tokenizeBufferIter = function*(buffer, {encoding = null} = {}) {

// Guess encoding

let detectedEncoding = jschardet.detect(buffer.slice(0, 100)).encoding
let detectedEncoding = jschardet.detect(buffer.slice(0, 1000)).encoding
let contents = iconv.decode(buffer, detectedEncoding)
let tokens = exports.tokenizeIter(contents)

Expand Down

0 comments on commit 3766246

Please sign in to comment.