Differences From Artifact [3a479b89af]:
- File
src/OFString_UTF8.m
— part of check-in
[3d16a30f41]
at
2013-06-22 12:12:36
on branch trunk
— Rework exceptions.
This mostly removes the argument for the class in which the exception
occurred. As backtraces were recently added for all platforms, the
passed class does not give any extra information on where the exception
occurred anymore.This also removes a few other arguments which were not too helpful. In
the past, the idea was to pass as many arguments as possible so that it
is easier to find the origin of the exception. However, as backtraces
are a much better way to find the origin, those are not useful anymore
and just make the exception more cumbersome to use. The rule is now to
only pass arguments that might help in recovering from the exception or
provide information that is otherwise not easily accessible. (user: js, size: 30279) [annotate] [blame] [check-ins using]
To Artifact [35d6df4f4a]:
- File src/OFString_UTF8.m — part of check-in [d36cf257fe] at 2013-08-12 10:00:11 on branch trunk — Don't store the first 128 chars of an encoding. (user: js, size: 30285) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
35 36 37 38 39 40 41 | #import "OFOutOfRangeException.h" #import "autorelease.h" #import "macros.h" #import "of_asprintf.h" #import "unicode.h" | | | | 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | #import "OFOutOfRangeException.h" #import "autorelease.h" #import "macros.h" #import "of_asprintf.h" #import "unicode.h" extern const of_char16_t of_iso_8859_15[128]; extern const of_char16_t of_windows_1252[128]; static inline int memcasecmp(const char *first, const char *second, size_t length) { size_t i; for (i = 0; i < length; i++) { |
︙ | ︙ | |||
298 299 300 301 302 303 304 | size_t characterBytes; if (!(cString[i] & 0x80)) { _s->cString[j++] = cString[i]; continue; } | | | 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 | size_t characterBytes; if (!(cString[i] & 0x80)) { _s->cString[j++] = cString[i]; continue; } character = table[(uint8_t)cString[i] - 128]; if (character == 0xFFFD) @throw [OFInvalidEncodingException exception]; _s->isUTF8 = true; characterBytes = of_string_utf8_encode(character, buffer); |
︙ | ︙ |