I've got a situation with a chat app with unicode languages. When someone says Hello in Russian, I'm able to push it out to the cloud infrastructure as "Здравствуйте". I can see it in the database as "Здравствуйте". When I hit my server's API directly to get the message back, I can see "Здравствуйте" displayed clearly in the results in the browser.
But when the app receives that same API response--mind you, it's the same app that was able to accept the user input and send it up to the cloud just fine--I get: "ÐдÑавÑÑвÑйÑе".
After doing some poking around, I found a couple of options on StackOverflow such as the following, which seemed promising, but I haven't found one that actually works yet.
let decodedString = String.init(utf8String: message.cString(using: String.Encoding.utf8)!)
let decodedString = String(utf8String: message.cString(using: .utf8)!)
There were some other options which also didn't work. I'm just bamboozled because in every other step it Just Works®. What am I doing wrong and how can I fix it?