I need to encode/decode emojis, I'm using this code
var encodeEmoji: String{
if let encodeStr = NSString(cString: self.cString(using: .nonLossyASCII)!, encoding: String.Encoding.utf8.rawValue){
return encodeStr as String
}
return self
}
For emojis all is fine, but when I'm coding Accented letters (æ, ø, å) I have something like this \346, \370, \345 Could anyone help to avoid converting of Accented letters, or say, what I'm doing wrong. Thanks in advance!