Hi all
im a ios dev for a project that hosted with asp.net
every thing is ok but in some api that have arabic character it shown coded
when i log whole job.getstring it shows
{"msg":{"IsError":false,"Message":"","eCode":0,"StartDate":"7/23/2018 1:49:56 PM","EndDate":"7/23/2018 1:49:56 PM"},"TicketList":[{"id":28,"priorityColor":"Normal","title":"ای او اس ۱","state":"0","stateText":"ارجاع نشده","Category":"شبکه","SubmitDateTime":"1397/04/20 - 19:10"},{"id":27,"priorityColor":"Warning","title":"تست جدید","state":"0","stateText":"ارجاع نشده","Category":"اینترنت","SubmitDateTime":"1397/04/20 - 19:01"},{"id":26,"priorityColor":"Warning","title":"تست ۷","state":"0","stateText":"ارجاع نشده","Category":"نرم افزار","SubmitDateTime":"1397/04/20 - 14:08"},{"id":25,"priorityColor":"Normal","title":"تست۶","state":"0","stateText":"ارجاع نشده","Category":"تلفن","SubmitDateTime":"1397/04/20 - 14:07"},{"id":24,"priorityColor":"Danger","title":"تست ۵","state":"0","stateText":"ارجاع نشده","Category":"تلفن","SubmitDateTime":"1397/04/20 - 14:07"}]}
and everything is ok
but when i use this method
to convert my json to map
every arabic character are encoded like this
"(read only map) {\n Category = \"\\U0634\\U0628\\U06a9\\U0647\";\n SubmitDateTime = \"1397/04/20 - 19:10\";\n id = 28;\n priorityColor = Normal;\n state = 0;\n stateText = \"\\U0627\\U0631\\U062c\\U0627\\U0639 \\U0646\\U0634\\U062f\\U0647\";\n title = \"\\U0627\\U06cc \\U0627\\U0648 \\U0627\\U0633 \\U06f1\";\n}",
how can i fix this
i thought it will be fixed when i put them in label or right place but nothing happen
i dont think there is a way in basic
maybe there is a way in obj_c
but i dont know
could any one help me
im a ios dev for a project that hosted with asp.net
every thing is ok but in some api that have arabic character it shown coded
when i log whole job.getstring it shows
{"msg":{"IsError":false,"Message":"","eCode":0,"StartDate":"7/23/2018 1:49:56 PM","EndDate":"7/23/2018 1:49:56 PM"},"TicketList":[{"id":28,"priorityColor":"Normal","title":"ای او اس ۱","state":"0","stateText":"ارجاع نشده","Category":"شبکه","SubmitDateTime":"1397/04/20 - 19:10"},{"id":27,"priorityColor":"Warning","title":"تست جدید","state":"0","stateText":"ارجاع نشده","Category":"اینترنت","SubmitDateTime":"1397/04/20 - 19:01"},{"id":26,"priorityColor":"Warning","title":"تست ۷","state":"0","stateText":"ارجاع نشده","Category":"نرم افزار","SubmitDateTime":"1397/04/20 - 14:08"},{"id":25,"priorityColor":"Normal","title":"تست۶","state":"0","stateText":"ارجاع نشده","Category":"تلفن","SubmitDateTime":"1397/04/20 - 14:07"},{"id":24,"priorityColor":"Danger","title":"تست ۵","state":"0","stateText":"ارجاع نشده","Category":"تلفن","SubmitDateTime":"1397/04/20 - 14:07"}]}
and everything is ok
but when i use this method
B4X:
Sub JsonToMap(strJSON As String) As Map
' convert a json string to a map
Dim jMap As Map
jMap.Initialize
Dim json As JSONParser
json.Initialize(strJSON)
jMap = json.NextObject
Return jMap
End Sub
every arabic character are encoded like this
"(read only map) {\n Category = \"\\U0634\\U0628\\U06a9\\U0647\";\n SubmitDateTime = \"1397/04/20 - 19:10\";\n id = 28;\n priorityColor = Normal;\n state = 0;\n stateText = \"\\U0627\\U0631\\U062c\\U0627\\U0639 \\U0646\\U0634\\U062f\\U0647\";\n title = \"\\U0627\\U06cc \\U0627\\U0648 \\U0627\\U0633 \\U06f1\";\n}",
how can i fix this
i thought it will be fixed when i put them in label or right place but nothing happen
i dont think there is a way in basic
maybe there is a way in obj_c
but i dont know
could any one help me