I'm trying to pass data from my server and display it in a UWP Windows app. The data is stored in a mySQL database
This is being output via PHP to a web page here http://www.rwscripts.com/scorealerts/v3/request.php?action=getTeams using this code
// Serialize the data structure
$result = json_encode($data,JSON_PRETTY_PRINT);
// Display the XML document
header('Content-type: application/json; charset=utf-8');
print $result;
I'm then reading this in my app with HttpWebRequest and then deserializing the JSON with JSON.net
JArray obj = JsonConvert.DeserializeObject(str.Trim()) as JArray;
if (obj == null || obj.Count == 0) return;
foreach (NotificationTeam nt in from JObject team in obj
select
new NotificationTeam
{
Title = team.Value<string>("teamName"),
TeamID = team.Value<int>("tid"),
Followers = team.Value<int>("followers")
})
{
nt.Notifications = ScoreManager.GetMgr().GetTeamNotification(nt.TeamID);
notificationTeams.Add(nt);
}
the output when displayed in my app is like this
which part of the flow needs to be changed to display the unicode characters correctly?