Added charset to encoding.
Switched from parseInt to parseFloat.