Hello Everyone,
I'm having big troubles with Unicode strings. I don't think that it's a WinDev problem but more a lack of knowledge by myself.
Here's what I'm trying to do :
I'm communicating with an API on a webserver. The communication itself seems to be working, the problem is that I'm receiving unicode characters and don't know how to handle them correctly.
This the connecting part of the code
MyRequest.URL = gsWS_URL + "get_user/" + NumToString(gnClientNumber)
MyRequest.ContentType = "application/json"
MyRequest.Header["X-API-KEY"] = gsTokenCode
MyRequest.Header["Username"] = gsWS_User
MyRequest.Header["Password"] = gsWS_Passw
gMyResponse = HTTPSend(MyRequest)
sResponse = gMyResponse..Content
sResponse is decladered as a normal string, and contains something like this :
"result":"success","DealerID":"17","Koppelveld":"5069","RoepNaam":"TESTDONGLE Patrick Thijs 1","PC_KEY":"PATRICK8","DatabaseTaal":"1","ProgrammaTaal":"1","UserLevel":"5","U_Adres":"Rik Woutersstraat 27","U_Postcode":"2800","U_Gemeente":"Mechelen \u266a\u266a\u266a","U_Land":"BE"
The problem is in the part "U_Gemeente":"Mechelen \u266a\266a\u266a"
I can't get this string to be displayed correctly, the unicode codes should display 3 musicnotes right after the word Mechelen.
But i'm not able to achieve this.
Is there anyone who can put me on the right track with this ?
Your help is really appreciated
grtz
Patrick
I'm having big troubles with Unicode strings. I don't think that it's a WinDev problem but more a lack of knowledge by myself.
Here's what I'm trying to do :
I'm communicating with an API on a webserver. The communication itself seems to be working, the problem is that I'm receiving unicode characters and don't know how to handle them correctly.
This the connecting part of the code
MyRequest.URL = gsWS_URL + "get_user/" + NumToString(gnClientNumber)
MyRequest.ContentType = "application/json"
MyRequest.Header["X-API-KEY"] = gsTokenCode
MyRequest.Header["Username"] = gsWS_User
MyRequest.Header["Password"] = gsWS_Passw
gMyResponse = HTTPSend(MyRequest)
sResponse = gMyResponse..Content
sResponse is decladered as a normal string, and contains something like this :
"result":"success","DealerID":"17","Koppelveld":"5069","RoepNaam":"TESTDONGLE Patrick Thijs 1","PC_KEY":"PATRICK8","DatabaseTaal":"1","ProgrammaTaal":"1","UserLevel":"5","U_Adres":"Rik Woutersstraat 27","U_Postcode":"2800","U_Gemeente":"Mechelen \u266a\u266a\u266a","U_Land":"BE"
The problem is in the part "U_Gemeente":"Mechelen \u266a\266a\u266a"
I can't get this string to be displayed correctly, the unicode codes should display 3 musicnotes right after the word Mechelen.
But i'm not able to achieve this.
Is there anyone who can put me on the right track with this ?
Your help is really appreciated
grtz
Patrick