Differences From Artifact [bbaed6eb9f]:
- File src/OFApplication.m — part of check-in [f12cecf014] at 2017-01-08 02:38:36 on branch trunk — Get native8BitEncoding from locale (user: js, size: 12412) [annotate] [blame] [check-ins using]
To Artifact [4b696ca492]:
- File
src/OFApplication.m
— part of check-in
[d6de0a1b71]
at
2017-01-08 03:45:05
on branch trunk
— Parse locale to get {language,territory,encoding}
Yes, there is really nothing to query this.
Yes, locales in C and POSIX are broken way beyond repair. (user: js, size: 11056) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
68 69 70 71 72 73 74 | - (void)OF_setArgumentCount: (int)argc andWideArgumentValues: (wchar_t*[])argv; #endif - (void)OF_run; @end static OFApplication *app = nil; | < | | 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | - (void)OF_setArgumentCount: (int)argc andWideArgumentValues: (wchar_t*[])argv; #endif - (void)OF_run; @end static OFApplication *app = nil; extern void of_system_info_parse_locale(char*); static void atexitHandler(void) { id <OFApplicationDelegate> delegate = [app delegate]; if ([delegate respondsToSelector: @selector(applicationWillTerminate)]) |
︙ | ︙ | |||
105 106 107 108 109 110 111 | of_application_main(int *argc, char **argv[], Class cls) { id <OFApplicationDelegate> delegate; #ifdef OF_WINDOWS wchar_t **wargv, **wenvp; int wargc, si = 0; #endif | < < < < | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | of_application_main(int *argc, char **argv[], Class cls) { id <OFApplicationDelegate> delegate; #ifdef OF_WINDOWS wchar_t **wargv, **wenvp; int wargc, si = 0; #endif of_system_info_parse_locale(setlocale(LC_ALL, "")); if ([cls isSubclassOfClass: [OFApplication class]]) { fprintf(stderr, "FATAL ERROR:\n Class %s is a subclass of " "class OFApplication, but class\n %s was specified as " "application delegate!\n Most likely, you wanted to " "subclass OFObject instead or specified\n the wrong class " "with OF_APPLICATION_DELEGATE().\n", |
︙ | ︙ |