46fo
V2EX  ›  问与答

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

  •  
  •   46fo · Mar 30, 2017 · 2213 views
    This topic created in 3527 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
    46fo
    OP
    Mar 30, 2017
    2
    @Dashit 求详解 怎么解决?
    66450146
    66450146
    Mar 30, 2017❤️1
    3
    @xdeng AFPS 不做 unicode normalization 了,如果需要这个功能的话得自己做
    46fo
    46fo
    OP
    Mar 30, 2017
    4

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