Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Japanese file name garbled #162

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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