46fo
V2EX  ›  问与答

发现一个 iOS 新文件系统 APFS 的问题,求高手回答。。。

  •  
  •   46fo · Mar 30, 2017 · 1963 views
    This topic created in 3336 days ago, the information mentioned may be changed or developed.

    问题如下

    在 iOS10.3 设备上创建的是两个文件,在 iOS10.3 以下设备上创建的是一个文件,是不是苹果 iOS 新文件系统 APFS 换了编码了?还是忘了写转换函数?求高手指点。。。

        char n[] = {0x72, 0x69, 0xcc, 0x81, 0x61, 0x2e, 0x63, 0x0};
        char nn[] = {0x72, 0xc3, 0xad, 0x61, 0x2e, 0x63, 0x0};
        
        NSString *docPath = [NSHomeDirectory() stringByAppendingString:@"/Documents/"];
        
        const char *p = [docPath cStringUsingEncoding:NSUTF8StringEncoding];
        
        char tmp[1024] = {0};
        strcpy(tmp, p);
        strcat(tmp, n);
        
        FILE *fn = fopen(tmp, "wb+");
        fclose(fn);
     
        char tmp1[1024] = {0};
        strcpy(tmp1, p);
        strcat(tmp1, nn);
        
        FILE *fnn = fopen(tmp1, "wb+");
        fclose(fnn);
    
    

    我该如何解决这个问题。。。

    5 replies    2017-03-31 11:00:21 +08:00
    46fo
        2
    46fo  
    OP
       Mar 30, 2017
    @Dashit 求详解 怎么解决?
    66450146
        3
    66450146  
       Mar 30, 2017   ❤️ 1
    @xdeng AFPS 不做 unicode normalization 了,如果需要这个功能的话得自己做
    46fo
        4
    46fo  
    OP
       Mar 30, 2017

    46fo
        5
    46fo  
    OP
       Mar 31, 2017
    @Dashit
    @66450146 谢谢解答,问题解决了。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3640 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 47ms · UTC 05:05 · PVG 13:05 · LAX 22:05 · JFK 01:05
    ♥ Do have faith in what you're doing.