Differences From Artifact [4623150629]:
- File src/OFString_UTF8.m — part of check-in [7a27ce7b0b] at 2017-01-17 03:23:54 on branch trunk — Add ISO-8859-2 (user: js, size: 29155) [annotate] [blame] [check-ins using]
To Artifact [652cb8ee2f]:
- File
src/OFString_UTF8.m
— part of check-in
[766eedef4c]
at
2017-01-19 23:08:16
on branch trunk
— Add support for disabling encodings
This allows building a smaller ObjFW if those are not needed. (user: js, size: 29405) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 | _s->cString[_s->cStringLength] = 0; return self; } switch (encoding) { case OF_STRING_ENCODING_ISO_8859_2: table = of_iso_8859_2; break; case OF_STRING_ENCODING_ISO_8859_15: table = of_iso_8859_15; break; case OF_STRING_ENCODING_WINDOWS_1251: table = of_windows_1251; break; case OF_STRING_ENCODING_WINDOWS_1252: table = of_windows_1252; break; case OF_STRING_ENCODING_CODEPAGE_437: table = of_codepage_437; break; case OF_STRING_ENCODING_CODEPAGE_850: table = of_codepage_850; break; case OF_STRING_ENCODING_CODEPAGE_858: table = of_codepage_858; break; case OF_STRING_ENCODING_MAC_ROMAN: table = of_mac_roman; break; default: @throw [OFInvalidEncodingException exception]; } j = 0; for (size_t i = 0; i < cStringLength; i++) { char buffer[4]; | > > > > > > > > > > > > > > > > | 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 | _s->cString[_s->cStringLength] = 0; return self; } switch (encoding) { #ifdef HAVE_ISO_8859_2 case OF_STRING_ENCODING_ISO_8859_2: table = of_iso_8859_2; break; #endif #ifdef HAVE_ISO_8859_15 case OF_STRING_ENCODING_ISO_8859_15: table = of_iso_8859_15; break; #endif #ifdef HAVE_WINDOWS_1251 case OF_STRING_ENCODING_WINDOWS_1251: table = of_windows_1251; break; #endif #ifdef HAVE_WINDOWS_1252 case OF_STRING_ENCODING_WINDOWS_1252: table = of_windows_1252; break; #endif #ifdef HAVE_CODEPAGE_437 case OF_STRING_ENCODING_CODEPAGE_437: table = of_codepage_437; break; #endif #ifdef HAVE_CODEPAGE_850 case OF_STRING_ENCODING_CODEPAGE_850: table = of_codepage_850; break; #endif #ifdef HAVE_CODEPAGE_858 case OF_STRING_ENCODING_CODEPAGE_858: table = of_codepage_858; break; #endif #ifdef HAVE_MAC_ROMAN case OF_STRING_ENCODING_MAC_ROMAN: table = of_mac_roman; break; #endif default: @throw [OFInvalidEncodingException exception]; } j = 0; for (size_t i = 0; i < cStringLength; i++) { char buffer[4]; |
︙ | ︙ |