Skip to content

Conversation

@sushma-shivakumar
Copy link

If ZZGeneralPurposeBitFlag is none then ZipZap is using kCFStringEncodingDOSLatinUS encoding by default

But if file name has Japanese characters then this encoding will not work and name looks garbled.

To fix this I’m using the below API

  • (NSStringEncoding)stringEncodingForData:(NSData *)data
    encodingOptions:(nullable NSDictionary<NSStringEncodingDetectionOptionsKey, id> *)opts
    convertedString:(NSString * _Nullable * _Nullable)string
    usedLossyConversion:(nullable BOOL *)usedLossyConversion

This API detects the string encoding of a given raw data and It converts the data to a string in the detected string encoding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant