Differences From Artifact [2f5eb2340c]:
- File
src/OFSystemInfo.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: 11642) [annotate] [blame] [check-ins using]
To Artifact [70cccb5f86]:
- File
src/OFSystemInfo.m
— part of check-in
[87e332d145]
at
2017-01-08 03:57:57
on branch trunk
— Accept "1252" as a valid encoding for a locale
Windows uses this. (user: js, size: 11779) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
106 107 108 109 110 111 112 113 114 115 116 117 118 119 | strcmp(tmp, "iso-8859-1") == 0) native8BitEncoding = OF_STRING_ENCODING_ISO_8859_1; else if (strcmp(tmp, "iso8859-15") == 0 || strcmp(tmp, "iso-8859-15") == 0) native8BitEncoding = OF_STRING_ENCODING_ISO_8859_15; } /* Territory */ if ((tmp = strrchr(locale, '_')) != NULL) { *tmp++ = '\0'; territory = [[OFString alloc] initWithCString: tmp | > > > > | 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 | strcmp(tmp, "iso-8859-1") == 0) native8BitEncoding = OF_STRING_ENCODING_ISO_8859_1; else if (strcmp(tmp, "iso8859-15") == 0 || strcmp(tmp, "iso-8859-15") == 0) native8BitEncoding = OF_STRING_ENCODING_ISO_8859_15; /* Windows uses a codepage */ else if (strcmp(tmp, "1252") == 0) native8BitEncoding = OF_STRING_ENCODING_WINDOWS_1252; } /* Territory */ if ((tmp = strrchr(locale, '_')) != NULL) { *tmp++ = '\0'; territory = [[OFString alloc] initWithCString: tmp |
︙ | ︙ |