Skip to content

Commit e178de1

Browse files
committed
Ticket #183: Bug fix -- cannot use webpack or browserify for client usage
1 parent a9535f3 commit e178de1

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

libs/core/Converter.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,12 @@ Converter.prototype._transform = function (data, encoding, cb) {
100100
data=this.prepareData(data);
101101
var idx =data.length-1;
102102
var left=null;
103+
/**
104+
* From Keyang:
105+
* The code below is to check if a single utf8 char (which could be multiple bytes) being split.
106+
* If the char being split, the buffer from two chunk needs to be concat
107+
* check how utf8 being encoded to understand the code below.
108+
*/
103109
if ((data[idx] & 1<<7) !=0){
104110
while ((data[idx] & 3<<6) === 128){
105111
idx--;

0 commit comments

Comments
 (0)