andreypopp / reactify

[DEPRECATED] Browserify transform for JSX (superset of JavaScript used in React library by Facebook)
MIT License
690 stars 68 forks source link

Mutlibyte encoding support #67

Closed uggedal closed 9 years ago

uggedal commented 9 years ago

Reactify (and many other browserify transforms it seems) does not handle mutibyte characters well. Depending on buffer sizes a chunk written to reactify's transform stream could be split in the middle of a multibye character. Since reactify converts the chunk to a string right away one could end up with the following string representations of two chunks (where � is the unicode replacement character):

"åååååååååååååååååå�"
"�åååååååååååååååååå"

which would be assembled to:

"åååååååååååååååååå��åååååååååååååååååå"
andreypopp commented 9 years ago

Thanks, published in 1.1.1.