Fredrik Roubert [Fri, 16 Dec 2022 05:59:41 +0000 (14:59 +0900)]
ICU-22193 Make clang-release-build-and-test work with ubuntu-latest.
Contemporary implementations of the C++ standard library also use the
@deprecated annotation in its header files and these then get included
by the preprocessor when preprocessing the ICU header files, like this:
/// @deprecated Non-standard. Use `is_null_pointer` instead.
In order to work as expected, testtagsguards.sh must therefore be
updated to ignore @deprecated annotations unless they're for ICU.
Jungshik Shin [Thu, 25 Aug 2022 08:04:33 +0000 (01:04 -0700)]
ICU-22119 Add lw=phrase for Korean using line_*_phrase_cj
brkitr/ko.txt is created to use line_*_.cj.txt for both
lw=phrase and lw != phrase cases for Korean. This is the simplest
way to fix ICU-22119 taking advantage of the fact that ICU
does not have a Korean dictionary so we don't have to worry about
adding the list of Korean particles to keep them attached to the
preceeding word.
The downside is that it only works when the locale is ko or ja while
it should work in any locale. Another is it makes ICU deviate from
CSS3 by using the same CJ (conditonal Japanese) rules for Korean as
well. However, CSS3 spec is wrong on that point and should be changed.
See https://unicode-org.atlassian.net/browse/CLDR-4931 .
Andy Heninger [Fri, 21 Oct 2022 03:30:24 +0000 (20:30 -0700)]
ICU-21180 RuleBasedBreakIterator, refactor init.
In class RuleBasedBreakIterator, refactor how object initialization is handled
by the various constructors, taking advantage of C++11's ability to directly
initialize data members in the class declaration.
This will simplify ongoing maintenance of the code by eliminating the need
to keep initialization lists synchronized with the class data members.
This is being done now in preparation for additional changes to fix problems
with the handling of memory allocation failures.
Andy Heninger [Thu, 20 Oct 2022 22:12:36 +0000 (15:12 -0700)]
ICU-21180 BreakIterator, change all NULL to nulptr
In the C++ break iterator code, change all use of NULL to nullptr.
This is in preparation for follow-on PRs to improve out-of-memory error handling
in Break Iterators, keeping use of nullptr consistent between old and new
or updated code.
- rewrite to semi modular code
- run the sections first, then get counts
- section counts in ToC, skip if empty
- many link improvements: linkify bugs and commits rather than separate lines
Steven R. Loomis [Tue, 26 Jul 2022 17:19:55 +0000 (12:19 -0500)]
ICU-21755 commit checker: add support for COMMIT_METADATA.md file
- new option, --commit-metadata= with path to metadata file
- new option, --fix-version=41 (used for SKIP sections)
- scaffolding for 'bad commits' list
- new module CommitMetadata with unit tests
- sample file format TEST_COMMIT_METADATA.md
- such commits are skipped
- refactored the commit skipping part (formerly used for cherry pick skips)
- add a report section for skipped commits
- add a cache for JIRA queries (for dev use): --cache-for-dev "/tmp/cldr-commit-cache" - optional
- add an 'excluded commits' section at the bottom
- make sure commit metadata is used to update ticket IDs and messages.
Rich Gillam [Thu, 4 Aug 2022 23:01:04 +0000 (16:01 -0700)]
ICU-21125 Improvements to resource fallback:
- Added code to use the parentLocales data in supplementalData.xml to determine the "parent locale ID" to use when
the requested resource bundle is not present (ICU-21126).
- Added code to change the parent-chain search path to handle the script better (ICU-21125; algorithm was described
in CLDR-15265):
- The base search patch is now ll_Ssss_RR -> ll_RR -> ll_Ssss -> ll -> root
- If the requested script is not the default script for the requested language and region, we automatically
avoid fallbacks that will implicitly change the script.
- Added new code to the CLDR-to-ICU data generation tool to generate source code, and used it to generate the lookup
tables for the new resource-fallback logic (we can't use the existing resource files for this, since that would
involve opening a resource bundle while trying to open another resource bundle). The data-generation stuff is
intended to be generic enough to allow for us to generate more static data tables in the future.
- Commented out a few collator tests, and changed one resource bundle test, because they're incompatible with the
new fallback logic (specifically, the default-script logic).
Kirill Müller [Mon, 15 Aug 2022 04:57:22 +0000 (06:57 +0200)]
ICU-22117 Replace uprv_strncpy() by uprv_memcpy()
This fixes a warning on gcc 9.4.0, which is triggered because the third argument to strncpy() depends on the length of the second argument (but should actually indicate the buffer size). Replacing by memcpy() seems harmless because a null terminator is appended further below, and the buffer is sized to be "large enough" elsewhere.
See https://github.com/duckdb/duckdb/issues/4391 for details.
Fixing the warning is important for us, because the checks in the duckdb repository treat all warnings as errors.
Cyndy Ishida [Thu, 23 Jun 2022 13:50:39 +0000 (06:50 -0700)]
ICU-22072 Update Darwin Specific Macros
* Update `U_PF_IPHONE` to be 0 when building for macOS/macCatalyst.
* add macro definition for `attribute((visibility("hidden")))` for cases
where internal structs exist within exposed classes.
Cyndy Ishida [Tue, 21 Jun 2022 19:56:49 +0000 (12:56 -0700)]
ICU-22068 Cleanup inconsistent annotations between declarations and definitions
This cleans up inconsistent annotations between declared APIs in headers
vs defined implementations in cpp's. This better ensures the API's
referenceable in headers represent what is exposed and defined in the
ultimate binary library's symbol table.
Fredrik Roubert [Tue, 6 Sep 2022 19:18:38 +0000 (21:18 +0200)]
ICU-21148 Consistently use standard lowercase true/false everywhere.
This is the normal standard way in C, C++ as well as Java and there's no
longer any reason for ICU to be different. The various internal macros
providing custom boolean constants can all be deleted and code as well
as documentation can be updated to use lowercase true/false everywhere.
Rich Gillam [Wed, 31 Aug 2022 00:43:30 +0000 (17:43 -0700)]
ICU-22081 More API-review fixes: Hoisted the PersonName object to the top level (in its own source file) and moved
NameField and FieldModifier there, plus a number of smaller changes.