marcuswestin / store.js

Cross-browser storage for all use cases, used across the web.
MIT License
14.01k stars 1.33k forks source link

Strange symbols when using store.js #275

Closed liusjose5 closed 6 years ago

liusjose5 commented 6 years ago

Hi Marcus, I've been using your library for quite some time now, but I'm facing a new issue: it seems like whenever I store some values using store.js it messes with the character coding. I'm attaching a screenshot of the console so you can see the problem. Any ideas around this? I've tried playing with the meta charset to no avail. Thanks

screen shot 2018-04-15 at 11 00 21 am
lianee commented 6 years ago

You're seeing strange chars because you're using the compression plugin. As you can see, store.get correctly retrieve the correct value

liusjose5 commented 6 years ago

Thank you very much for your answer.

What would be the work around?

Should I include a different file than store.everything.min.js?

Thanks again,

Luis

lianee commented 6 years ago

It is doing the right thing, you store things and retrieve them exactly as you stored them, so you don't need a work-around... If you really don't want your data compressed, then you need to "not" include the compression plugin. Unfortunately, as the builds are right now, you just include them all... or none, or you'll have to make a custom build, see #238

liusjose5 commented 6 years ago

Got it. Thanks very much for the info.