Deserialize special characters/symbols?
Deserialize special characters/symbols?
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
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