Skip to content

Commit 9e7f863

Browse files
srl295MylesBorins
authored andcommitted
deps: ICU 60.2 bump
- Update to Maintainance ICU 60.2 - CLDR 32.0.1 - http://site.icu-project.org/download/60#TOC-ICU-60.2-bug-fixes - Subsumes #16931 PR-URL: #17687 Reviewed-By: Tiancheng "Timothy" Gu <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 8c6dc62 commit 9e7f863

File tree

14 files changed

+51
-31
lines changed

14 files changed

+51
-31
lines changed

configure

+2-2
Original file line numberDiff line numberDiff line change
@@ -1125,8 +1125,8 @@ def glob_to_var(dir_base, dir_sub, patch_dir):
11251125
def configure_intl(o):
11261126
icus = [
11271127
{
1128-
'url': 'https://ssl.icu-project.org/files/icu4c/60.1/icu4c-60_1-src.zip',
1129-
'md5': 'e6cb990ac2a3161d31a3def8435f80cb',
1128+
'url': 'https://ssl.icu-project.org/files/icu4c/60.2/icu4c-60_2-src.zip',
1129+
'md5': '115908818fd0324530b2acb1b029738d',
11301130
},
11311131
]
11321132
def icu_download(path):

deps/icu-small/source/common/rbbi_cache.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ class RuleBasedBreakIterator::BreakCache: public UMemory {
121121
* If the requested position is a break boundary, leave the iteration
122122
* position on it.
123123
* If the requested position is not a boundary, leave the iteration
124-
* position on the preceding boundary and include both the the
124+
* position on the preceding boundary and include both the
125125
* preceding and following boundaries in the cache.
126126
* Additional boundaries, either preceding or following, may be added
127127
* to the cache as a side effect.

deps/icu-small/source/common/rbbicst.pl

100644100755
File mode changed.

deps/icu-small/source/common/ucnv_u8.cpp

+15-3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include "unicode/utf.h"
2929
#include "unicode/utf8.h"
3030
#include "unicode/utf16.h"
31+
#include "uassert.h"
3132
#include "ucnv_bld.h"
3233
#include "ucnv_cnv.h"
3334
#include "cmemory.h"
@@ -694,7 +695,9 @@ ucnv_UTF8FromUTF8(UConverterFromUnicodeArgs *pFromUArgs,
694695
// Use a single counter for source and target, counting the minimum of
695696
// the source length and the target capacity.
696697
// Let the standard converter handle edge cases.
698+
const uint8_t *limit=sourceLimit;
697699
if(count>targetCapacity) {
700+
limit-=(count-targetCapacity);
698701
count=targetCapacity;
699702
}
700703

@@ -707,11 +710,11 @@ ucnv_UTF8FromUTF8(UConverterFromUnicodeArgs *pFromUArgs,
707710
// sequence from the previous buffer.
708711
int32_t length=count-toULimit;
709712
if(length>0) {
710-
uint8_t b1=*(sourceLimit-1);
713+
uint8_t b1=*(limit-1);
711714
if(U8_IS_SINGLE(b1)) {
712715
// common ASCII character
713716
} else if(U8_IS_TRAIL(b1) && length>=2) {
714-
uint8_t b2=*(sourceLimit-2);
717+
uint8_t b2=*(limit-2);
715718
if(0xe0<=b2 && b2<0xf0 && U8_IS_VALID_LEAD3_AND_T1(b2, b1)) {
716719
// truncated 3-byte sequence
717720
count-=2;
@@ -811,7 +814,7 @@ ucnv_UTF8FromUTF8(UConverterFromUnicodeArgs *pFromUArgs,
811814
}
812815

813816
/* copy the legal byte sequence to the target */
814-
{
817+
if(count>=toULength) {
815818
int8_t i;
816819

817820
for(i=0; i<oldToULength; ++i) {
@@ -822,9 +825,18 @@ ucnv_UTF8FromUTF8(UConverterFromUnicodeArgs *pFromUArgs,
822825
*target++=*source++;
823826
}
824827
count-=toULength;
828+
} else {
829+
// A supplementary character that does not fit into the target.
830+
// Let the standard converter handle this.
831+
source-=(toULength-oldToULength);
832+
pToUArgs->source=(char *)source;
833+
pFromUArgs->target=(char *)target;
834+
*pErrorCode=U_USING_DEFAULT_WARNING;
835+
return;
825836
}
826837
}
827838
}
839+
U_ASSERT(count>=0);
828840

829841
if(U_SUCCESS(*pErrorCode) && source<sourceLimit) {
830842
if(target==(const uint8_t *)pFromUArgs->targetLimit) {

deps/icu-small/source/common/unicode/brkiter.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ class U_COMMON_API BreakIterator : public UObject {
292292
* does nothing. Negative values move to previous boundaries
293293
* and positive values move to later boundaries.
294294
* @return The new iterator position, or
295-
* DONE if there are fewer than |n| boundaries in the specfied direction.
295+
* DONE if there are fewer than |n| boundaries in the specified direction.
296296
* @stable ICU 2.0
297297
*/
298298
virtual int32_t next(int32_t n) = 0;

deps/icu-small/source/common/unicode/ucnv.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
* converter, you can get its properties, set options, convert your data and
3030
* close the converter.</p>
3131
*
32-
* <p>Since many software programs recogize different converter names for
32+
* <p>Since many software programs recognize different converter names for
3333
* different types of converters, there are other functions in this API to
3434
* iterate over the converter aliases. The functions {@link ucnv_getAvailableName() },
3535
* {@link ucnv_getAlias() } and {@link ucnv_getStandardName() } are some of the
@@ -184,7 +184,7 @@ typedef enum {
184184

185185
/**
186186
* Function pointer for error callback in the codepage to unicode direction.
187-
* Called when an error has occured in conversion to unicode, or on open/close of the callback (see reason).
187+
* Called when an error has occurred in conversion to unicode, or on open/close of the callback (see reason).
188188
* @param context Pointer to the callback's private data
189189
* @param args Information about the conversion in progress
190190
* @param codeUnits Points to 'length' bytes of the concerned codepage sequence
@@ -452,7 +452,7 @@ ucnv_openU(const UChar *name,
452452
* @param platform the platform in which the codepage number exists
453453
* @param err error status <TT>U_MEMORY_ALLOCATION_ERROR, U_FILE_ACCESS_ERROR</TT>
454454
* @return the created Unicode converter object, or <TT>NULL</TT> if an error
455-
* occured.
455+
* occurred.
456456
* @see ucnv_open
457457
* @see ucnv_openU
458458
* @see ucnv_close
@@ -596,7 +596,7 @@ U_NAMESPACE_END
596596
* stateful, then subChars will be an empty string.
597597
*
598598
* @param converter the Unicode converter
599-
* @param subChars the subsitution characters
599+
* @param subChars the substitution characters
600600
* @param len on input the capacity of subChars, on output the number
601601
* of bytes copied to it
602602
* @param err the outgoing error status code.
@@ -832,7 +832,7 @@ ucnv_getMinCharSize(const UConverter *converter);
832832
* name will be filled in.
833833
*
834834
* @param converter the Unicode converter.
835-
* @param displayLocale is the specific Locale we want to localised for
835+
* @param displayLocale is the specific Locale we want to localized for
836836
* @param displayName user provided buffer to be filled in
837837
* @param displayNameCapacity size of displayName Buffer
838838
* @param err error status code
@@ -877,7 +877,7 @@ ucnv_getName(const UConverter *converter, UErrorCode *err);
877877
*
878878
* @param converter the Unicode converter
879879
* @param err the error status code.
880-
* @return If any error occurrs, -1 will be returned otherwise, the codepage number
880+
* @return If any error occurs, -1 will be returned otherwise, the codepage number
881881
* will be returned
882882
* @see ucnv_openCCSID
883883
* @see ucnv_getPlatform

deps/icu-small/source/common/unicode/utext.h

+9-9
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ utext_equals(const UText *a, const UText *b);
389389

390390
/*****************************************************************************
391391
*
392-
* Functions to work with the text represeted by a UText wrapper
392+
* Functions to work with the text represented by a UText wrapper
393393
*
394394
*****************************************************************************/
395395

@@ -433,7 +433,7 @@ utext_isLengthExpensive(const UText *ut);
433433
*
434434
* The iteration position will be set to the start of the returned code point.
435435
*
436-
* This function is roughly equivalent to the the sequence
436+
* This function is roughly equivalent to the sequence
437437
* utext_setNativeIndex(index);
438438
* utext_current32();
439439
* (There is a subtle difference if the index is out of bounds by being less than zero -
@@ -592,7 +592,7 @@ U_STABLE void U_EXPORT2
592592
utext_setNativeIndex(UText *ut, int64_t nativeIndex);
593593

594594
/**
595-
* Move the iterator postion by delta code points. The number of code points
595+
* Move the iterator position by delta code points. The number of code points
596596
* is a signed number; a negative delta will move the iterator backwards,
597597
* towards the start of the text.
598598
* <p>
@@ -611,7 +611,7 @@ U_STABLE UBool U_EXPORT2
611611
utext_moveIndex32(UText *ut, int32_t delta);
612612

613613
/**
614-
* Get the native index of the character preceeding the current position.
614+
* Get the native index of the character preceding the current position.
615615
* If the iteration position is already at the start of the text, zero
616616
* is returned.
617617
* The value returned is the same as that obtained from the following sequence,
@@ -628,7 +628,7 @@ utext_moveIndex32(UText *ut, int32_t delta);
628628
* native index of the character most recently returned from utext_next().
629629
*
630630
* @param ut the text to be accessed
631-
* @return the native index of the character preceeding the current index position,
631+
* @return the native index of the character preceding the current index position,
632632
* or zero if the current position is at the start of the text.
633633
* @stable ICU 3.6
634634
*/
@@ -1054,7 +1054,7 @@ UTextAccess(UText *ut, int64_t nativeIndex, UBool forward);
10541054
* be NUL-terminated if there is sufficient space in the destination buffer.
10551055
*
10561056
* @param ut the UText from which to extract data.
1057-
* @param nativeStart the native index of the first characer to extract.
1057+
* @param nativeStart the native index of the first character to extract.
10581058
* @param nativeLimit the native string index of the position following the last
10591059
* character to extract.
10601060
* @param dest the UChar (UTF-16) buffer into which the extracted text is placed
@@ -1211,7 +1211,7 @@ UTextClose(UText *ut);
12111211
struct UTextFuncs {
12121212
/**
12131213
* (public) Function table size, sizeof(UTextFuncs)
1214-
* Intended for use should the table grow to accomodate added
1214+
* Intended for use should the table grow to accommodate added
12151215
* functions in the future, to allow tests for older format
12161216
* function tables that do not contain the extensions.
12171217
*
@@ -1345,7 +1345,7 @@ typedef struct UTextFuncs UTextFuncs;
13451345
struct UText {
13461346
/**
13471347
* (private) Magic. Used to help detect when UText functions are handed
1348-
* invalid or unitialized UText structs.
1348+
* invalid or uninitialized UText structs.
13491349
* utext_openXYZ() functions take an initialized,
13501350
* but not necessarily open, UText struct as an
13511351
* optional fill-in parameter. This magic field
@@ -1367,7 +1367,7 @@ struct UText {
13671367

13681368

13691369
/**
1370-
* Text provider properties. This set of flags is maintainted by the
1370+
* Text provider properties. This set of flags is maintained by the
13711371
* text provider implementation.
13721372
* @stable ICU 3.4
13731373
*/

deps/icu-small/source/common/unicode/uvernum.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
* This value will change in the subsequent releases of ICU
6565
* @stable ICU 2.6
6666
*/
67-
#define U_ICU_VERSION_MINOR_NUM 1
67+
#define U_ICU_VERSION_MINOR_NUM 2
6868

6969
/** The current ICU patchlevel version as an integer.
7070
* This value will change in the subsequent releases of ICU
@@ -119,7 +119,7 @@
119119
* This value will change in the subsequent releases of ICU
120120
* @stable ICU 2.4
121121
*/
122-
#define U_ICU_VERSION "60.1"
122+
#define U_ICU_VERSION "60.2"
123123

124124
/** The current ICU library major/minor version as a string without dots, for library name suffixes.
125125
* This value will change in the subsequent releases of ICU
@@ -131,7 +131,7 @@
131131
/** Data version in ICU4C.
132132
* @internal ICU 4.4 Internal Use Only
133133
**/
134-
#define U_ICU_DATA_VERSION "60.1"
134+
#define U_ICU_DATA_VERSION "60.2"
135135
#endif /* U_HIDE_INTERNAL_API */
136136

137137
/*===========================================================================
75.1 KB
Binary file not shown.

deps/icu-small/source/i18n/calendar.cpp

+10-2
Original file line numberDiff line numberDiff line change
@@ -708,6 +708,8 @@ fZone(NULL),
708708
fRepeatedWallTime(UCAL_WALLTIME_LAST),
709709
fSkippedWallTime(UCAL_WALLTIME_LAST)
710710
{
711+
validLocale[0] = 0;
712+
actualLocale[0] = 0;
711713
clear();
712714
if (U_FAILURE(success)) {
713715
return;
@@ -734,6 +736,8 @@ fZone(NULL),
734736
fRepeatedWallTime(UCAL_WALLTIME_LAST),
735737
fSkippedWallTime(UCAL_WALLTIME_LAST)
736738
{
739+
validLocale[0] = 0;
740+
actualLocale[0] = 0;
737741
if (U_FAILURE(success)) {
738742
return;
739743
}
@@ -766,6 +770,8 @@ fZone(NULL),
766770
fRepeatedWallTime(UCAL_WALLTIME_LAST),
767771
fSkippedWallTime(UCAL_WALLTIME_LAST)
768772
{
773+
validLocale[0] = 0;
774+
actualLocale[0] = 0;
769775
if (U_FAILURE(success)) {
770776
return;
771777
}
@@ -822,8 +828,10 @@ Calendar::operator=(const Calendar &right)
822828
fWeekendCease = right.fWeekendCease;
823829
fWeekendCeaseMillis = right.fWeekendCeaseMillis;
824830
fNextStamp = right.fNextStamp;
825-
uprv_strcpy(validLocale, right.validLocale);
826-
uprv_strcpy(actualLocale, right.actualLocale);
831+
uprv_strncpy(validLocale, right.validLocale, sizeof(validLocale));
832+
uprv_strncpy(actualLocale, right.actualLocale, sizeof(actualLocale));
833+
validLocale[sizeof(validLocale)-1] = 0;
834+
actualLocale[sizeof(validLocale)-1] = 0;
827835
}
828836

829837
return *this;

deps/icu-small/source/i18n/regexcst.pl

100644100755
File mode changed.

deps/icu-small/source/i18n/unicode/selfmt.h

100644100755
File mode changed.

deps/icu-small/source/tools/genrb/genrb.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ processFile(const char *filename, const char *cp,
652652
goto finish;
653653
}
654654
if (ucbuf == NULL || U_FAILURE(status)) {
655-
fprintf(stderr, "An error occured processing file %s. Error: %s\n",
655+
fprintf(stderr, "An error occurred processing file %s. Error: %s\n",
656656
openFileName == NULL ? filename : openFileName, u_errorName(status));
657657
goto finish;
658658
}

deps/icu-small/source/tools/genrb/parse.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ parseUCARules(ParseState* state, char *tag, uint32_t startline, const struct USt
362362
ucbuf = ucbuf_open(filename, &cp, getShowWarning(),FALSE, status);
363363

364364
if (U_FAILURE(*status)) {
365-
error(line, "An error occured while opening the input file %s\n", filename);
365+
error(line, "An error occurred while opening the input file %s\n", filename);
366366
return NULL;
367367
}
368368

@@ -500,7 +500,7 @@ parseTransliterator(ParseState* state, char *tag, uint32_t startline, const stru
500500
ucbuf = ucbuf_open(filename, &cp, getShowWarning(),FALSE, status);
501501

502502
if (U_FAILURE(*status)) {
503-
error(line, "An error occured while opening the input file %s\n", filename);
503+
error(line, "An error occurred while opening the input file %s\n", filename);
504504
return NULL;
505505
}
506506

@@ -758,7 +758,7 @@ GenrbImporter::getRules(
758758
return;
759759
}
760760
if (ucbuf.isNull() || U_FAILURE(errorCode)) {
761-
fprintf(stderr, "An error occured processing file %s. Error: %s\n", openFileName.data(), u_errorName(errorCode));
761+
fprintf(stderr, "An error occurred processing file %s. Error: %s\n", openFileName.data(), u_errorName(errorCode));
762762
return;
763763
}
764764

0 commit comments

Comments
 (0)