Swift中String和UTF8编码的NSData相互转化
let testStr = "212 212"let testData = testStr.dataUsingEncoding(NSUTF8StringEncoding) // String转UTF8let dogString:String = (NSString(data: testData!, encoding: NSUTF8StringEncoding))! as String //