I need to post Unicode characters to a database. The database I am using receives a NSDictionary and stores that as a JSONObject.
The dictionary is created like:
NSMutableDictionary *messageDictionary = [[NSMutableDictionary alloc] init ];
[messageDictionary setObject:@"message" forKey:@"type"];
[messageDictionary setObject:@"È ê ü à ã" forKey:@"message"];
The database then stores the result as:
{
type = message;
message = \"\\U00c8 \\U00ea \\U00fc \\U00e0 \\U00e3\";
}
if I post just the string outside of the dictionary the database stores:
{
message = È ê ü à ã
}
How do I prevent the NSDictionary from editing these characters and storing them the same way they are entered into a Text View. The same goes for when entering Emoji's into a Text View and sending that. The response I need stored is:
{
type = messages;
message = "È ê ü à ã";
}