Peter Edberg
b79ef68c32
ICU-22583 BRS 75rc CLDR 45-alpha0 to ICU main part 1 (binary data, binary-like source data)
2024-02-06 18:07:44 -08:00
Fredrik Roubert
d28e12b1f2
ICU-22520 Replace char arrays with icu::CharString.
2024-02-06 19:53:53 +01:00
Fredrik Roubert
930b4d9ab9
ICU-22520 Add convenience wrappers for calling ulocimp_getSubtags().
...
These wrappers that call ulocimp_getSubtags() to get only one particular
subtag and then return that as icu::CharString will be convenient for
replacing code that currently calls the uloc_get*() functions writing
into a fixed size buffer.
2024-02-06 19:53:53 +01:00
Fredrik Roubert
835b009314
ICU-22520 Make ulocimp_get*() internal to ulocimp_getSubtags().
...
These functions now no longer have any other callers so they can be made
internal to the compilation unit of ulocimp_getSubtags(), thus bringing
them back to how they originally were intended to be used (and making
the comment above them true once again).
This also makes it possible to remove the temporary icu::CharString
objects that previously were returned to callers and instead write
directly to icu::ByteSink, making the code both simpler and less
wasteful (also that how this was once intended).
2024-02-06 13:12:55 +01:00
Fredrik Roubert
1b768edbdf
ICU-22520 Update all users of ulocimp_get*() to ulocimp_getSubtags().
...
This simplifies the code by removing the need for finding the positions
of the subtags, all that logic is now in just one single place.
2024-02-06 13:12:55 +01:00
Fredrik Roubert
dc70b5a056
ICU-22520 Move all localeID parsing logic into new ulocimp_getSubtags().
...
The logic for parsing a localeID string into its constituent subtags is
currently repeated over and over again in each one of the uloc_get*()
functions, so that calling all these functions one after the other in
order to get all the subtags does the parsing all over again from the
beginning for each function call.
In order to avoid having to do this parsing over and over again, a lot
of code instead has its own copy of the parsing logic in order to call
the underlying ulocimp_get*() functions directly for lower runtime cost
at the price of increased code complexity and repetition.
This new ulocimp_getSubtags() function, which writes natively to
icu::ByteSink and has a convenience wrapper to write to icu::CharString,
removes the repeated code from the uloc_get*() functions and makes it
possible to update all code that calls the ulocimp_get*() functions.
2024-02-06 13:12:55 +01:00
Fredrik Roubert
678d5c1273
ICU-22520 Replace use of ulocimp_forLanguageTag() in uloc_getVariant().
...
Originally added by commit 24055f8585
for ICU-7882, converting any language tag with a BCP-47 extension into a
legacy Unicode locale ID was a simple way to make the existing code keep
working unchanged also with BCP-47 extensions.
But the only thing that uloc_getVariant() needs is being able to find
out where variants end and extensions begin, for which converting the
entire language tag is unnecessary, it's much more straightforward to
instead just check for the -t-, -u- or -x- marker that indicates the
start of a BCP-47 extension.
2024-02-06 13:12:55 +01:00
Fredrik Roubert
6fa113eaa8
ICU-22651 Refactor U_DEFINE_LOCAL_OPEN_POINTER into a template.
2024-02-05 14:15:15 +01:00
Frank Tang
b8271577b6
ICU-22649 Fix possible leakage by using LocalUResourceBundlePointer
2024-02-02 10:24:21 -08:00
Fredrik Roubert
6562a7df85
ICU-22627 Delete obsolete test case letest/api/ScriptTest.
2024-02-02 15:55:27 +01:00
Frank Tang
9515e82741
ICU-22633 Fix Integer-overflow in icu_75::Calendar::add
...
See #2805
2024-02-01 13:49:41 -08:00
Fredrik Roubert
ae9cc8cbd1
ICU-22520 Replace char arrays with icu::CharString.
2024-01-30 12:04:53 +01:00
Fredrik Roubert
1b0f5e41c5
ICU-22520 Switch to using CharString for calling uloc_setKeywordValue().
2024-01-30 12:04:53 +01:00
Fredrik Roubert
340806bf9a
ICU-22520 Add a ulocimp_setKeywordValue() that writes to icu::ByteSink.
2024-01-30 12:04:53 +01:00
Frank Tang
e1415d1282
ICU-22635 Avoid integer-overflow for invalid large UChar32
2024-01-29 11:57:12 -08:00
Frank Tang
8f80c62aa2
ICU-22638 Fix cast overflow issue
2024-01-25 12:11:56 -08:00
Elango Cheran
400d97e7d2
ICU-22533 Update Maven CLI instructions for multi-module ICU4J
...
See #2791
2024-01-23 13:59:56 -08:00
Frank Tang
f7f9dbb88d
ICU-22641 Change const refs in the class to const pointers
...
The function may return nullptr, we cannot just deref the return value.
Change them to const pointer instead.
2024-01-23 13:39:49 -08:00
Fredrik Roubert
e81b8727aa
ICU-22532 Move the definition of _POSIX_C_SOURCE to the Makefile.
...
This is already set in Makefile.in and therefore results in a macro
redefined warning if also defined in the source file. It seems that
setting this in the Makefile was how it was originally intended do be
done (but then it was just never updated there).
2024-01-23 13:00:54 +09:00
Fredrik Roubert
5eded36279
ICU-22520 Bugfix: Use macro parameter name instead of variable name.
2024-01-23 13:00:26 +09:00
Frank Tang
7c48842e23
ICU-22637 Accept non-ASCII digit to fix mistake
2024-01-22 14:00:12 -08:00
Fredrik Roubert
49a7a1e76d
ICU-22520 Update urename.h with ulocimp_getParent().
...
This was forgotten in commit 037449fff8
.
2024-01-22 12:30:37 +09:00
Fredrik Roubert
9167d6beaf
ICU-21107 Update configure files from configure.ac using autoreconf.
2024-01-22 12:30:24 +09:00
Fredrik Roubert
ac7e3de879
ICU-21107 Remove obsolete conditional use of C++17 std::string_view.
...
ICU4C now requires C++17 so std::string_view must always be available.
2024-01-22 12:30:24 +09:00
Frank Tang
9832f48e22
ICU-22636 Return U_BRK_RULE_SYNTAX when status number is too large
...
See #2793
2024-01-19 17:16:54 -08:00
Fredrik Roubert
7cec4a9308
ICU-21107 Replace use of adapter and binder classes removed in C++17.
2024-01-19 19:49:44 +09:00
Frank Tang
c8336085bb
ICU-22637 Rewrite custom timezone parser
...
See #2792
2024-01-19 01:44:52 -08:00
Frank Tang
3eb8923b97
ICU-22638 Use parseNumber to fix buffer-overflow
...
See #2795
2024-01-19 01:43:35 -08:00
Fredrik Roubert
7b690aa8c7
ICU-22639 Revert now obsolete bug workarounds.
...
This reverts changes from commit 47b9a517be
.
This reverts changes from commit 214ae60d94
.
2024-01-19 13:11:49 +09:00
Fredrik Roubert
c5160765d4
ICU-22639 Clone the calendar so we don't mess with the real one.
2024-01-19 08:07:22 +09:00
Fredrik Roubert
ca53838b83
ICU-22576 Remove now obsolete pre-C11 backward compatibility code.
2024-01-19 08:05:24 +09:00
Fredrik Roubert
d0672fa8ab
ICU-21107 Simplify type_traits expressions for C++17.
2024-01-18 20:28:39 +09:00
Fredrik Roubert
981057143c
ICU-21107 Remove CI jobs using MSVC too old to support C11.
...
Versions before VS 2019 don't have C11 standard library features:
https://learn.microsoft.com/en-us/cpp/overview/visual-cpp-language-conformance?view=msvc-170#c-standard-library-features-1
2024-01-18 13:03:45 +09:00
Mihai Nita
47b9a517be
ICU-21107 Specify language standard versions C11 & C++17 also for MSVC
...
ICU-21107 Specify language standard versions C11 & C++17 also for MSVC
2024-01-17 09:26:22 -08:00
Fredrik Roubert
4a8cd80973
ICU-21107 Clarify the C11 & C++17 requirement in the userguide.
2024-01-17 17:48:10 +09:00
Fredrik Roubert
2d65456a3b
ICU-21107 Specify language standard versions C11 & C++17 also for Bazel.
...
This is copied (with C11 added) from:
https://github.com/tensorflow/tensorflow/blob/v2.15.0/.bazelrc
There were until now no versions specified at all, relying on the
default (or commandline overrides) to be sufficiently recent.
2024-01-17 16:26:57 +09:00
Fredrik Roubert
078b88a11a
ICU-21107 Specify language standard versions C11 & C++17 also for MSVC.
...
There were until now no versions specified at all, relying on the
default (or commandline overrides) to be sufficiently recent.
2024-01-16 22:22:05 +09:00
Fredrik Roubert
214ae60d94
ICU-21107 Bugfix: Break up statement to force execution order.
2024-01-16 22:22:05 +09:00
Fredrik Roubert
ab72ab1d4a
ICU-22520 Replace char arrays with icu::CharString & icu::MemoryPool.
2024-01-13 17:05:58 +09:00
Frank Tang
509405c9f2
ICU-22626 Fix leakage when 2 '=' in PluralRules
...
See #2782
2024-01-12 09:36:29 -08:00
yumaoka
dc7014fda6
ICU-22620 tz2023d updates
2024-01-11 11:41:23 -05:00
Fredrik Roubert
a837e0d399
ICU-22532 Set a value for _POSIX_C_SOURCE to get symlink() declared.
...
ISO C99 and later do not support implicit function declarations.
2024-01-11 17:35:28 +09:00
Frank Tang
23d1fc5989
ICU-22549 Fix incorrect pointer
...
Remove the adjustment of data pointer to avoid buffer-overflow
Fix bug https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=65632
2024-01-10 12:36:39 -08:00
Fredrik Roubert
906093f31b
ICU-22520 Make icu::CharString comparable with itself.
2024-01-10 17:30:32 +09:00
Fredrik Roubert
87ca023447
ICU-22520 Replace char arrays with icu::CharString.
2024-01-10 12:19:44 +09:00
Frank Tang
ed970751ef
ICU-22520 Add test case for oss-fuzz issue #65635 .
2024-01-10 12:19:44 +09:00
Frank Tang
3f054adaf3
ICU-22549 Fix fuzzer to call Locale with null-terminiate string
2024-01-05 01:18:48 -08:00
Frank Tang
cfba9a8caf
ICU-22549 Reland PR2770 w/ fix
...
Reland PR2770 w/ the fix that null termination the input to Locale
constuctor.
2024-01-05 01:18:10 -08:00
Fredrik Roubert
539e8f41a3
ICU-22532 Compiler warning: conversion from 'double' to 'int32_t'.
...
The definition of kOneDay is 1.0 * U_MILLIS_PER_DAY so there's no
reason whatsoever to not just use U_MILLIS_PER_DAY directly here.
2024-01-04 09:40:40 +09:00
Frank Yung-Fong Tang
52ff51e82c
ICU-22549 Revert "Improve fuzzer to test more locale"
...
See #2770
2024-01-03 14:19:32 -08:00