-
mrchairmanAsked on October 6, 2016 at 1:44 AM
Hi I have the similar problem when tried to grab the data insert into mysql UTF8
After
function stripslashes_deep($value){
$value = is_array($value) ?
array_map('stripslashes_deep', $value) :
stripslashes($value);
return $value;
}
//json to php
$result = stripslashes_deep($_REQUEST['rawRequest']);
$obj = json_decode($result, true);
I debug the result and found this
{"slug":"submit/62783803236459/","input_language":"Thai","q20_input20":{"first":"u0e17u0e14u0e2au0e2du0e1au0e1au0e2du0e35u0e01u0e01","last":"u0e2du0e22u0e32u0e01u0e01u0e25u0e2du0e07u0e07"},"q72_input72":"u0e2du0e49u0e19u0e19u0e19","q69_input69":{"area":" 088","phone":"3557777"},"q68_email":"mm@live.com","q73_input73":"u0e17u0e35u0e48u0e2du0e2du0e2du0e2du0e2du0e2du0e2du0e2du0e2du0e2du0e2du0e2d","q7_input7":"35","q11_input11":"189","q10_input10":"67","q37_input37":"u0e2du0e22u0e32u0e01u0e01u0e25u0e14u0e14u0e14u0e14u0e14u0e14u0e14u0e14u0e14u0e14u0e14u0e14u0e14u0e14u0e14","q67_input67":["2 u0e2au0e31u0e1bu0e14u0e32u0e2bu0e4c"],"q71_input71":"lineeidddddddddddd","event_id":"1475726050218_62783803236459_aQKkcBt"}
and after json_decode
"q72_input72":"u0e2du0e49u0e19u0e19u0e19"
The $obj still be the same value
u0e2du0e49u0e19u0e19u0e19
-
liyamReplied on October 6, 2016 at 2:46 AM
Hello,
Do you still have the data of the original request data and compare it instead if json_decode or other functions might have altered the data?
I believe if the obj var still returns the same value means that has become the source text and could not be changed to a different unicode value anymore.
Or do you mean that this is the only part that does not get changed?
"q72_input72":"u0e2du0e49u0e19u0e19u0e19"
Will look forward to your response.
Thanks.
-
mrchairmanReplied on October 6, 2016 at 2:54 AM
Hello Support
thank you for your response I've already found some way after waiting for your response
I notice that as in your recommend website http://requestb.in/ There is another Key=>Value
that Key lead to the right encoded strings so I replace
$result = stripslashes_deep($_REQUEST['rawRequest']);
with
$result = stripslashes_deep($_REQUEST['pretty']);
and now the Key "pretty" work for me!
any way Thank for your support :)
-
liyamReplied on October 6, 2016 at 3:00 AM
Thanks for letting us know. We're glad you found a way to address the issue.
If you have other questions or concerns, please do let us know.
Warm regards. :)
-
mrchairmanReplied on October 7, 2016 at 2:44 PM
-
Support_Management Jotform SupportReplied on October 7, 2016 at 5:30 PM
We have moved your most recent question to a separate thread https://www.jotform.com/answers/954777
We'll have it addressed there shortly.