ObjFW  Diff

Differences From Artifact [e4ea0d48b5]:

To Artifact [1d7ba884bb]:


747
748
749
750
751
752
753
754

755
756
757
758

759
760
761
762
763
764
765

766
767
768
769



770
771
772
773
774
775
776
777
747
748
749
750
751
752
753

754




755







756




757
758
759

760
761
762
763
764
765
766







-
+
-
-
-
-
+
-
-
-
-
-
-
-
+
-
-
-
-
+
+
+
-







			encoding = OF_STRING_ENCODING_ISO_8859_1;
		if ([contentType hasSuffix: @"encoding=iso-8859-15"])
			encoding = OF_STRING_ENCODING_ISO_8859_15;
		if ([contentType hasSuffix: @"encoding=windows-1252"])
			encoding = OF_STRING_ENCODING_WINDOWS_1252;
	}

	if (encoding == OF_STRING_ENCODING_AUTODETECT) {
	if (encoding == OF_STRING_ENCODING_AUTODETECT)
		@try {
			self = [[c alloc]
			    initWithCString: (char*)[[result data] cArray]
				   encoding: OF_STRING_ENCODING_UTF_8
		encoding = OF_STRING_ENCODING_UTF_8;
				     length: [[result data] count]];
		} @catch (OFInvalidEncodingException *e) {
			self = [[c alloc]
			    initWithCString: (char*)[[result data] cArray]
				   encoding: OF_STRING_ENCODING_ISO_8859_1
				     length: [[result data] count]];
		}

	} else {
		self = [[c alloc] initWithCString: (char*)[[result data] cArray]
					 encoding: encoding
					   length: [[result data] count]];
	self = [[c alloc] initWithCString: (char*)[[result data] cArray]
				 encoding: encoding
				   length: [[result data] count]];
	}

	[pool release];
	return self;
}

- (const char*)cString
{