我从 web api 收到带有转义的 unicode 字符的字符串,例如:Pla\u010daj Izbri\u0161i.
public func decode(data: Data) throws -> String {
guard let text = String(data: data, encoding: .utf8) else {
throw SomeError()
}
// text = Pla\u010daj Izbri\u0161i
}
将其转换为正常可显示的 unicode 字符串的最佳方法是什么?