ObjFW  Check-in [b240b71cec]

Overview
Comment:OFLocalization: Accept a DOS codepage as well
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: b240b71cec8401c5209cbdb3ae37b408010d26d79c5ab249cc478e0dbf318add
User & Date: js on 2017-01-16 03:28:09
Other Links: manifest | tags
Context
2017-01-17
01:20
Allow iso_8859-* spellings for encoding check-in: 238d47a1d6 user: js tags: trunk
2017-01-16
03:28
OFLocalization: Accept a DOS codepage as well check-in: b240b71cec user: js tags: trunk
02:54
Update buildsys check-in: b6cf934c67 user: js tags: trunk
Changes

Modified src/OFLocalization.m from [9170e13ef8] to [2eb0e472df].

104
105
106
107
108
109
110
111

112
113
114
115






116
117
118
119
120
121
122
104
105
106
107
108
109
110

111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128







-
+




+
+
+
+
+
+







				_encoding = OF_STRING_ENCODING_ASCII;
			else if (strcmp(tmp, "iso8859-1") == 0 ||
			    strcmp(tmp, "iso-8859-1") == 0)
				_encoding = OF_STRING_ENCODING_ISO_8859_1;
			else if (strcmp(tmp, "iso8859-15") == 0 ||
			    strcmp(tmp, "iso-8859-15") == 0)
				_encoding = OF_STRING_ENCODING_ISO_8859_15;
			/* Windows uses a codepage */
			/* Windows and DJGPP use a codepage */
			else if (strcmp(tmp, "1251") == 0)
				_encoding = OF_STRING_ENCODING_WINDOWS_1251;
			else if (strcmp(tmp, "1252") == 0)
				_encoding = OF_STRING_ENCODING_WINDOWS_1252;
			else if (strcmp(tmp, "437") == 0)
				_encoding = OF_STRING_ENCODING_CODEPAGE_437;
			else if (strcmp(tmp, "850") == 0)
				_encoding = OF_STRING_ENCODING_CODEPAGE_850;
			else if (strcmp(tmp, "858") == 0)
				_encoding = OF_STRING_ENCODING_CODEPAGE_858;
		}

		/* Territory */
		if ((tmp = strrchr(locale, '_')) != NULL) {
			*tmp++ = '\0';

			tmpLen = strlen(tmp);