iOS emoji 琛ㄦ儏 澶勭悊

鏁版嵁搴撶紪鐮佹槸GBK缂栫爜锛岃嫻鏋滅郴缁熺殑缂栫爜鏍煎紡鏄疷TF8缂栫爜锛屾墍浠ュ湪鎶奺moji琛ㄦ儏瀛樺埌GBK缂栫爜鐨勬暟鎹簱鐨勫氨浼氬嚭鐜颁贡鐮佺殑鐜拌薄锛屽鑷存暟鎹簱鏃犳硶淇濆瓨銆�

鐩墠鎴戦噰鐢ㄧ殑鏂瑰紡鏄浆鎴恇ase64

//base64杞琒tring
NSData *data = [[NSData alloc] initWithBase64EncodedString:dataDic[@"content"] options:NSDataBase64DecodingIgnoreUnknownCharacters];
NSString *content = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];

//String杞琤ase64
NSData *data = [content dataUsingEncoding:NSUTF8StringEncoding];
NSString *stringBase64 = [data base64EncodedStringWithOptions:NSDataBase64EncodingEndLineWithLineFeed];

濡傛湁鏇村ソ鐨勫姙娉曟杩庢寚鍑� 锜硅煿馃榿

你可能感兴趣的:(iOS emoji 琛ㄦ儏 澶勭悊)