ObjFW  Check-in [b8afc53cce]

Overview
Comment:OFLHAArchive: Don't default to ISO 8859-1
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: b8afc53ccef3be56e2fe4524ca27d73e0768374a6d9b3e17b1213550ce25eed2
User & Date: js on 2024-03-03 20:03:06
Other Links: manifest | tags
Context
2024-03-03
20:45
Fix build for AmigaOS check-in: 75a8f74494 user: js tags: trunk
20:03
OFLHAArchive: Don't default to ISO 8859-1 check-in: b8afc53cce user: js tags: trunk
19:54
ofarc: Add support for creating Zoo archives check-in: 780132a941 user: js tags: trunk
Changes

Modified src/OFLHAArchive.h from [064a650fc9] to [6cbad68afa].

39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#endif
	OFStream *_Nullable _lastReturnedStream;
@protected
	bool _hasWritten;
}

/**
 * @brief The encoding to use for the archive. Defaults to ISO 8859-1.
 */
@property (nonatomic) OFStringEncoding encoding;

/**
 * @brief Creates a new OFLHAArchive object with the specified stream.
 *
 * @param stream A stream from which the LHA archive will be read.







|







39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#endif
	OFStream *_Nullable _lastReturnedStream;
@protected
	bool _hasWritten;
}

/**
 * @brief The encoding to use for the archive. Defaults to UTF-8.
 */
@property (nonatomic) OFStringEncoding encoding;

/**
 * @brief Creates a new OFLHAArchive object with the specified stream.
 *
 * @param stream A stream from which the LHA archive will be read.

Modified src/OFLHAArchive.m from [de067758a4] to [1e418bf0dc].

131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
			 * Only works with properly zero-terminated files that
			 * have no trailing garbage. Unfortunately there is no
			 * good way to check for this other than reading the
			 * entire archive.
			 */
			[(OFSeekableStream *)_stream seekToOffset: -1
							   whence: OFSeekEnd];

		_encoding = OFStringEncodingISO8859_1;
	} @catch (id e) {
		[self release];
		@throw e;
	}

	return self;
}







<
<







131
132
133
134
135
136
137


138
139
140
141
142
143
144
			 * Only works with properly zero-terminated files that
			 * have no trailing garbage. Unfortunately there is no
			 * good way to check for this other than reading the
			 * entire archive.
			 */
			[(OFSeekableStream *)_stream seekToOffset: -1
							   whence: OFSeekEnd];


	} @catch (id e) {
		[self release];
		@throw e;
	}

	return self;
}