Deserialize special characters/symbols?

Deserialize special characters/symbols?

abhisheknarulaabhisheknarula Posts: 1Questions: 1Answers: 0
edited February 2018 in Free community support

I am using serialize function to bundle data from the list of input control that contains special characters/symbols such as ™ ,(commas) etc. After serialize they get converted into a format something like %E2%84%A2 this.

Now while retrieving from database how should convert back these into meaningful characters/symbols into their original form?

Please advise.

var oTable = $('#searchable').DataTable();
var data = oTable.$('input, select').serialize();

Input: Clampseal™
After Serialzie: Clampseal%E2%84%A2

Input: Angle, Y, or T pattern
After Serialize: Angle%2C+Y%2C+or+T+pattern

Answers

  • allanallan Posts: 61,635Questions: 1Answers: 10,092 Site admin

    They are URL encoded which is what jQuery's $().serialize() method does. Use a URI decoder in whatever server-side environment you are using to decode them.

    Allan

This discussion has been closed.