Overview
| Comment: | Try to autodetect the encoding in +[OFString stringWithContentsOfURL:]. |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
1dadc4b4a64c46a9bfce987195f0b429 |
| User & Date: | js on 2011-04-25 22:31:01 |
| Other Links: | manifest | tags |
Context
|
2011-04-25
| ||
| 22:39 | Fix missing release in OFXMLElement. (check-in: 74d5765c1f user: js tags: trunk) | |
| 22:31 | Try to autodetect the encoding in +[OFString stringWithContentsOfURL:]. (check-in: 1dadc4b4a6 user: js tags: trunk) | |
| 18:49 | Added tag 0.5.2-release for changeset 6702b5c91a13 (check-in: b9b4a8e270 user: js tags: trunk) | |
Changes
Modified src/OFString.h from [1b480c69df] to [fdc7cb8d4c].
| ︙ | |||
25 26 27 28 29 30 31 | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | - + + |
/**
* \brief The encoding of a string.
*/
typedef enum of_string_encoding_t {
OF_STRING_ENCODING_UTF_8,
OF_STRING_ENCODING_ISO_8859_1,
OF_STRING_ENCODING_ISO_8859_15,
|
| ︙ | |||
145 146 147 148 149 150 151 | 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 | - - + + + + + + + | * \param encoding The encoding of the file * \return A new autoreleased OFString */ + stringWithContentsOfFile: (OFString*)path encoding: (of_string_encoding_t)encoding; /** |
| ︙ | |||
277 278 279 280 281 282 283 | 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 | + + - + + + + + | * \return An initialized OFString */ - initWithContentsOfFile: (OFString*)path encoding: (of_string_encoding_t)encoding; /** * Initializes an already allocated OFString with the contents of the specified * URL. * |
| ︙ |
Modified src/OFString.m from [ec60fe00a5] to [e4ea0d48b5].
| ︙ | |||
28 29 30 31 32 33 34 35 36 37 38 39 40 41 | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | + | # include <sys/mman.h> #else # define madvise(addr, len, advise) #endif #import "OFString.h" #import "OFArray.h" #import "OFDictionary.h" #import "OFFile.h" #import "OFURL.h" #import "OFHTTPRequest.h" #import "OFAutoreleasePool.h" #import "OFHTTPRequestFailedException.h" #import "OFInitializationFailedException.h" |
| ︙ | |||
56 57 58 59 60 61 62 | 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | - + |
/* References for static linking */
void _references_to_categories_of_OFString(void)
{
_OFString_Hashing_reference = 1;
_OFString_URLEncoding_reference = 1;
_OFString_XMLEscaping_reference = 1;
_OFString_XMLUnescaping_reference = 1;
|
| ︙ | |||
695 696 697 698 699 700 701 | 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 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 778 | - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + |
return self;
}
- initWithContentsOfURL: (OFURL*)URL
{
return [self initWithContentsOfURL: URL
|
| ︙ |