smaz.js icon indicating copy to clipboard operation
smaz.js copied to clipboard

unicode strings garbled

Open alexandervlpl opened this issue 4 years ago • 1 comments

This port of Smaz doesn't support the full Unicode character set. It silently outputs garbage! :fearful:

smaz.decompress(smaz.compress("€"))
"¬"

smaz.decompress(smaz.compress("привет мир"))
"?@825B <8@"

When correctly compressed externally, these strings can be decompressed by smaz.js. So the problem seems to be with compression only.

Also, some unicode characters are fine:

smaz.decompress(smaz.compress("öäü"))
"öäü"

alexandervlpl avatar Apr 27 '20 13:04 alexandervlpl

I apologize for these flaws @alexandervlpl. I have grossly neglected this library over the years.

personalcomputer avatar Jun 05 '22 22:06 personalcomputer