How convert string to utf-8? (Swift, Alamofire) -
me need alamofire send utf-8 parameters server, transmits english characters normally, russian characters hieroglyphs. after checking encoding found used maccyrillic characters.
let parameters: parameters = ["username": login.text!, "password": password.text!]
alamofire.request("link ti site", method: .post, parameters: parameters).responsejson { response in switch response.result { case .success: let json = json(response.result.value) case .failure( _): var errorstring = "null" if let data = response.data { if let json = try? jsonserialization.jsonobject(with: data, options: []) as! [string: string] { errorstring = json["error"]! } } } }
need help. you.
Comments
Post a Comment