lz-string-php icon indicating copy to clipboard operation
lz-string-php copied to clipboard

JS compressToUTF16 produces different output than PHP compressToUTF16

Open Turtlehead91 opened this issue 8 years ago • 1 comments

Looks like the JS compressToUTF16 produces different output than the PHP copy. I know it's a tedious issue to look into, but is there a chance you could amend the UTF16 to match that of the JS version? I'm working on a project right now that passes compressed data to the server and than expects the PHP to decompress it. It would be a life saver if the PHP UTF16 matched the JS UTF16.

Thanks!

Turtlehead91 avatar Sep 12 '16 03:09 Turtlehead91

Which version of lz-string.js are you using? 1.3.8 from 2015 introduced some breaking changes.

From the lz-string.js readme:

If you are using one of the ports of lz-string to decode on the server what was encoded in the browser, you might want to use version 1.3.7 as the version 1.3.8 introduced a slight change in the encoding.

jmo84 avatar Jan 16 '18 20:01 jmo84