ICU: Update to version 70.1
This commit is contained in:
parent
157cba3933
commit
44a241b241
173 changed files with 10272 additions and 8071 deletions
11
thirdparty/icu4c/common/putil.cpp
vendored
11
thirdparty/icu4c/common/putil.cpp
vendored
|
|
@ -727,8 +727,10 @@ static char *gTimeZoneBufferPtr = NULL;
|
|||
|
||||
#if !U_PLATFORM_USES_ONLY_WIN32_API
|
||||
#define isNonDigit(ch) (ch < '0' || '9' < ch)
|
||||
#define isDigit(ch) ('0' <= ch && ch <= '9')
|
||||
static UBool isValidOlsonID(const char *id) {
|
||||
int32_t idx = 0;
|
||||
int32_t idxMax = 0;
|
||||
|
||||
/* Determine if this is something like Iceland (Olson ID)
|
||||
or AST4ADT (non-Olson ID) */
|
||||
|
|
@ -736,6 +738,13 @@ static UBool isValidOlsonID(const char *id) {
|
|||
idx++;
|
||||
}
|
||||
|
||||
/* Allow at maximum 2 numbers at the end of the id to support zone id's
|
||||
like GMT+11. */
|
||||
idxMax = idx + 2;
|
||||
while (id[idx] && isDigit(id[idx]) && idx < idxMax) {
|
||||
idx++;
|
||||
}
|
||||
|
||||
/* If we went through the whole string, then it might be okay.
|
||||
The timezone is sometimes set to "CST-7CDT", "CST6CDT5,J129,J131/19:30",
|
||||
"GRNLNDST3GRNLNDDT" or similar, so we cannot use it.
|
||||
|
|
@ -918,7 +927,7 @@ static UBool compareBinaryFiles(const char* defaultTZFileName, const char* TZFil
|
|||
if (sizeFile != tzInfo->defaultTZFileSize) {
|
||||
result = FALSE;
|
||||
} else {
|
||||
/* Store the data from the files in seperate buffers and
|
||||
/* Store the data from the files in separate buffers and
|
||||
* compare each byte to determine equality.
|
||||
*/
|
||||
if (tzInfo->defaultTZBuffer == NULL) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue