UTF64转String

    NSString *str = @"测试转换";
    UInt64 buff_str[1024];
    memcpy(buff_str,[str UTF8String], [str length]+1);
    NSLog(@"char = %s",buff_str);
    
    NSString *str_From_buff = [NSString stringWithCString:(char*)buff_str encoding:NSUTF8StringEncoding];
    NSLog(@"string = %@",str_From_buff);

你可能感兴趣的:(UTF64转String)