IOS 10.3 APFS does not support most non-English character solutions

Source: Internet
Author: User

Background

The recent development of the dictionary software found that offline package audio can not be played in iOS 10.3, after investigation found that iOS 10.3 used Apple's new file system APFS, and APFS does not support the majority of non-English characters similar (zi? Ca?n xi?ng hui?). Cause ssziparchive Unable to extract the bands of the file. The program does not have any exceptions during the entire decompression process. Finally, the problem is that iOS 10.3 uses the APFS system on the fopen () to not open the bands file name, and the entire process does not have any error messages and exception warnings.


Official introduction

APFS is currently unusable and most non-english languages.
The time had come to test out my fears over problems with file and folder names Inapple ' s new filing system, APFS. The TL;DR is, Apfs is isn't currently safeto use with names which might has Unicode normalisation Issues–which meansi T is safe with a limited ASCII character set, as shown in the Bizarrescreen shot above.

Solution Solutions

When a fopen () is used, if the current file has a special character, use Nsfilemanager to modify the current filename, using the Cfstringconvertencodingtonsstringencoding renames the current file name through kcfstringencodinggb_18030_2000 . Use Nsfilemanager to rename the restore after fopen () has been manipulated.

Resolving code References

1- (void) Testfopen: (nsstring*) FullPath {2     //Start3FILE *FP = fopen ((Const Char*) [FullPath utf8string],"WB");4NSString *tmpfullpath =Nil;5     //determines whether a file is created, without using temporary file names for processing6     if(![[Nsfilemanager Defaultmanager] Fileexistsatpath:fullpath]) {7 fclose (FP);8         //Working with temporary file names9NSString *dir =[FullPath stringbydeletinglastpathcomponent];TenNSString *tmpfilename =[FullPath lastpathcomponent]; OneNsstringencoding enc =cfstringconvertencodingtonsstringencoding (kcfstringencodinggb_18030_2000); ATmpfilename =[NSString stringwithcstring:[tmpfilename utf8string] encoding:enc]; -Tmpfullpath =[dir stringbyappendingpathcomponent:tmpfilename]; -fp = fopen ((Const Char*) [Tmpfullpath utf8string],"WB"); the     } -     //FP Todo -     //... -      +     //End - fclose (FP); +     if(Tmpfullpath &&[[Nsfilemanager Defaultmanager] Fileexistsatpath:tmpfullpath]) { A         //using rename restore at [[Nsfilemanager Defaultmanager] Moveitematpath:tmpfullpath topath:fullpath Error:nil]; -     } -     if([[[Nsfilemanager Defaultmanager] Fileexistsatpath:fullpath]) { -NSLog (@"file exist"); -     } -}

Resources

https://eclecticlight.co/2017/04/06/apfs-is-currently-unusable-with-most-non-english-languages/

IOS 10.3 APFS does not support most non-English character solutions

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.