We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Here is little patch to support other encodings than UTF8 for the features/ARC branch
@@ -98,7 +98,7 @@ - (id)initWithData:(NSData *)inData options:(NSUInteger)inOptions error:(NSError **)outError { - return [self initWithData:inData encoding:NSUTF8StringEncoding options:inOptions error:outError]; + return [self initWithData:inData encoding:0 options:inOptions error:outError]; } - (id)initWithData:(NSData *)inData encoding:(NSStringEncoding)encoding options:(NSUInteger)inOptions error:(NSError **)outError @@ -126,7 +126,7 @@ { CFStringEncoding cfenc = CFStringConvertNSStringEncodingToEncoding(encoding); CFStringRef cfencstr = CFStringConvertEncodingToIANACharSetName(cfenc); - const char *enc = CFStringGetCStringPtr(cfencstr, 0); + const char *enc = cfencstr != NULL ? CFStringGetCStringPtr(cfencstr, 0) : NULL; theDoc = xmlReadMemory([inData bytes], [inData length], NULL, enc, XML_PARSE_RECOVER | XML_PARSE_NOWARNING); }
The text was updated successfully, but these errors were encountered:
Please re-submit this as a pull request.
Thanks.
Sorry, something went wrong.
How can I implement this code? I cannot understand. :((
No branches or pull requests
Here is little patch to support other encodings than UTF8 for the features/ARC branch
The text was updated successfully, but these errors were encountered: