mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-06 22:15:31 +00:00
Compare commits
233 commits
release-76
...
main
Author | SHA1 | Date | |
---|---|---|---|
|
89fe16ef3b | ||
|
e1f13e1518 | ||
|
572d03f85a | ||
|
046392853d | ||
|
770c4b8042 | ||
|
e296ac93b5 | ||
|
1ea549be99 | ||
|
7eb090f910 | ||
|
ee90520429 | ||
|
1bf6bf774d | ||
|
d0e30acc68 | ||
|
0b98404454 | ||
|
d93b8bb344 | ||
|
f6abd2cc2e | ||
|
7e63370784 | ||
|
cfed9374b7 | ||
|
2628d4ed32 | ||
|
f6894e28d2 | ||
|
ad0df7e4c8 | ||
|
dcff47f86b | ||
|
434ef42093 | ||
|
57eaf4997a | ||
|
37e7693ab2 | ||
|
d78cf74bca | ||
|
b65650bc5f | ||
|
3edd9c828a | ||
|
255eb4ef3e | ||
|
cdf52396dc | ||
|
545bf260e1 | ||
|
ba0f39b592 | ||
|
72406ed78a | ||
|
f23af97cf4 | ||
|
c5b7dce96b | ||
|
457157a92a | ||
|
cc9adb6c32 | ||
|
27cc39a620 | ||
|
30e23b0d28 | ||
|
faa80a2972 | ||
|
9cc28a6428 | ||
|
443c8c5187 | ||
|
53adb4bca8 | ||
|
d6ca2ba5de | ||
|
19dd858b6a | ||
|
7931e6f7ce | ||
|
c210730f76 | ||
|
0b88b1c754 | ||
|
0748442ed6 | ||
|
60a0d9fcd8 | ||
|
7aae07acc9 | ||
|
950ddc299b | ||
|
9f51147189 | ||
|
1f1c09027c | ||
|
1b48d262c2 | ||
|
6cc1618136 | ||
|
2339ae4c0d | ||
|
cfc208f546 | ||
|
b42e7250f0 | ||
|
d69d452382 | ||
|
215131c1a4 | ||
|
579840539f | ||
|
66c6771a03 | ||
|
3b2bd4b19d | ||
|
61b2dbc980 | ||
|
7da5e90a3d | ||
|
3c85be19ec | ||
|
acc69ceb55 | ||
|
ecd22c10d0 | ||
|
3f5fd0df73 | ||
|
afa06d2bcd | ||
|
5463eac8b4 | ||
|
aa724e1e3f | ||
|
83726260ef | ||
|
59719f09d9 | ||
|
b81956ebcc | ||
|
e20b71af50 | ||
|
35c9778781 | ||
|
59af52bb6f | ||
|
030c79fe88 | ||
|
42e3b43c78 | ||
|
c9ca3cd554 | ||
|
03021a98a0 | ||
|
b7b2a14e85 | ||
|
84599e1117 | ||
|
339ebb368f | ||
|
fe4549dc62 | ||
|
53e40b1fe8 | ||
|
19458b75f4 | ||
|
b2026ecc5b | ||
|
5ae7f068b1 | ||
|
7b8110f003 | ||
|
624a26030b | ||
|
bbaa68419b | ||
|
40c325322e | ||
|
db42c87936 | ||
|
ee8806e87c | ||
|
e8c179dedd | ||
|
c4acc449ff | ||
|
f495d10a15 | ||
|
ddabf0faeb | ||
|
d9505ae577 | ||
|
5d7f0b8100 | ||
|
362a4aa94b | ||
|
697f7c0e00 | ||
|
4a7a4c7521 | ||
|
f9ee689d7a | ||
|
0112e4292e | ||
|
bc7ccb0589 | ||
|
a262e87aa6 | ||
|
0ceea4bee9 | ||
|
c6e1c09dbd | ||
|
9cbc8d7fe4 | ||
|
bf675e3ba1 | ||
|
9ad9c03062 | ||
|
ede201c305 | ||
|
cb4344073b | ||
|
95afc45afa | ||
|
4e1d9b30a5 | ||
|
d49c1242f9 | ||
|
06c2096fea | ||
|
90e3e1e882 | ||
|
fb64693c28 | ||
|
d61ec78c93 | ||
|
92b52ae6e3 | ||
|
8dfcbb5d09 | ||
|
8a11097b2e | ||
|
a154b5839c | ||
|
7153a3db52 | ||
|
6d8b63ce84 | ||
|
4fc1b7e7f6 | ||
|
d70b252cdc | ||
|
4df4eb419b | ||
|
16e50b260f | ||
|
ba4d4d3ac2 | ||
|
242bf9655f | ||
|
036919214c | ||
|
2c667e31cf | ||
|
373cbaf3b2 | ||
|
384c54ce66 | ||
|
2c5e021f6d | ||
|
2d6a4185c3 | ||
|
13a5e29644 | ||
|
f8aa68b0c1 | ||
|
bd50f8be32 | ||
|
ba5cf31f77 | ||
|
9eafd8ca3e | ||
|
6f93c07a45 | ||
|
a8d9f471ea | ||
|
b1acce62de | ||
|
c49a9c2a33 | ||
|
df0422ed3f | ||
|
b2a47f9aa4 | ||
|
6091406a3a | ||
|
4c3622f218 | ||
|
93ce388619 | ||
|
ed69e5336d | ||
|
d9d09db2a7 | ||
|
841e88bc8c | ||
|
e515c84645 | ||
|
ff31805f56 | ||
|
b0ae845e47 | ||
|
c0a3fe15d4 | ||
|
38b6d7fe5a | ||
|
7546622f87 | ||
|
4c9ef1a31b | ||
|
7d60bb844e | ||
|
e3bc073737 | ||
|
320220ef69 | ||
|
70409090de | ||
|
8655718531 | ||
|
d03826cdee | ||
|
ba012a74a1 | ||
|
a7291c4e51 | ||
|
81d047524c | ||
|
4ff5d6a070 | ||
|
02951053b4 | ||
|
494e8cdc93 | ||
|
1b8118049f | ||
|
fae4512d33 | ||
|
515d0a7393 | ||
|
2fa8a0908c | ||
|
3b9c0fc4a5 | ||
|
e2581fd1ac | ||
|
c3929d1595 | ||
|
791a052f8e | ||
|
62b95bb5f9 | ||
|
2e57f07cdf | ||
|
73956e9cf3 | ||
|
36b552737f | ||
|
5314d9d737 | ||
|
e59065cc74 | ||
|
757f27cd35 | ||
|
3f959352b5 | ||
|
5519b85730 | ||
|
e025466e3a | ||
|
2ba362fa3b | ||
|
424d6a3e8b | ||
|
1dccc10085 | ||
|
cd9fada30c | ||
|
e000c5c3cc | ||
|
e38ac306bc | ||
|
b54f3f5d91 | ||
|
743998dfaf | ||
|
f55c499927 | ||
|
5ceee1660f | ||
|
d6f8a14f8c | ||
|
38c046b60c | ||
|
06a23f8d37 | ||
|
8b28c3843f | ||
|
1a52a130b7 | ||
|
0b9eb9ca71 | ||
|
700c5e36a1 | ||
|
44ea9278b9 | ||
|
fbfbe6c7aa | ||
|
8dc2ec0bb0 | ||
|
0357501948 | ||
|
376da67f8d | ||
|
842899d81a | ||
|
8d86ca142e | ||
|
d868f13bd8 | ||
|
e29e86d62a | ||
|
698217ef63 | ||
|
23673a19ae | ||
|
3fe88eb8b3 | ||
|
99ca2ad931 | ||
|
8772cc49f5 | ||
|
ee8a94e0f1 | ||
|
6153f2ef85 | ||
|
1dcb4bcb2d | ||
|
ca9fcca3c7 | ||
|
6ca288559f | ||
|
5b45e5c64b | ||
|
8437d1d86b | ||
|
3cd97add1e |
9456 changed files with 41015 additions and 87158 deletions
0
.github/README.md → .github/HOWTO.md
vendored
0
.github/README.md → .github/HOWTO.md
vendored
2
.github/adaboost.json
vendored
2
.github/adaboost.json
vendored
|
@ -1,6 +1,6 @@
|
|||
// © 2022 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
// Generated using tools/cldr/cldr-to-icu/build-icu-data.xml
|
||||
// Generated using tools/cldr/cldr-to-icu/
|
||||
//
|
||||
// Include Japanese adaboost model.
|
||||
{
|
||||
|
|
2
.github/lstm_for_th_my.json
vendored
2
.github/lstm_for_th_my.json
vendored
|
@ -1,6 +1,6 @@
|
|||
// © 2021 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
// Generated using tools/cldr/cldr-to-icu/build-icu-data.xml
|
||||
// Generated using tools/cldr/cldr-to-icu/
|
||||
//
|
||||
// Include Burmese and Thai lstm models.
|
||||
{
|
||||
|
|
28
.github/pull_request_template.md
vendored
28
.github/pull_request_template.md
vendored
|
@ -1,25 +1,25 @@
|
|||
TODO: Please describe your changes here.
|
||||
|
||||
TODO: Delete the following lines but _keep and fill out_ (!) the checklist below.
|
||||
TODO: Please read the following on ICU Contributing, and then delete these instructions.
|
||||
|
||||
Thank you for your pull request!\
|
||||
General info on contributing: Please see https://github.com/unicode-org/icu/blob/main/CONTRIBUTING.md
|
||||
Thank you for your pull request!
|
||||
|
||||
Contributors license agreement (CLA):
|
||||
- You will be automatically asked to sign the CLA before the PR is accepted.
|
||||
- To sign the CLA: https://cla-assistant.io/unicode-org/icu
|
||||
* For general info on contributing: https://github.com/unicode-org/icu/blob/main/CONTRIBUTING.md
|
||||
* Associating PRs with Jira issues
|
||||
- We require each pull request to be associated with a [Jira issue](https://icu.unicode.org/bugs).
|
||||
- Reuse existing issues for minor changes:
|
||||
* ICU 78 docs minor fixes: ICU-23055 — User Guide & API docs typos etc., and version updates (e.g., dependabot for User Guide)
|
||||
* ICU 78 code warnings/version updates: ICU-23054 — Fix compiler warnings. Update versions of code-related dependencies (e.g., dependabot).
|
||||
* Contributors license agreement (CLA):
|
||||
- You will be automatically asked to sign the CLA before the PR is accepted.
|
||||
- To sign the CLA: https://cla-assistant.io/unicode-org/icu
|
||||
- For terms of use and license, see https://www.unicode.org/terms_of_use.html
|
||||
|
||||
For terms of use and license, see https://www.unicode.org/terms_of_use.html
|
||||
|
||||
TODO: End of lines to delete.
|
||||
TODO: Fill out the checklist below.
|
||||
|
||||
#### Checklist
|
||||
- [ ] Required: Issue filed: https://unicode-org.atlassian.net/browse/ICU-NNNNN
|
||||
- For minor changes you can use one of the following per-release tickets:
|
||||
- ICU 77 code warnings/version updates: ICU-22920 — Fix compiler warnings. Update versions of code-related dependencies (e.g., dependabot).
|
||||
- ICU 77 docs minor fixes: ICU-22921 — User Guide & API docs typos etc., and version updates (e.g., dependabot for User Guide)
|
||||
- [ ] Required: Issue filed: ICU-NNNNN
|
||||
- [ ] Required: The PR title must be prefixed with a JIRA Issue number. Example: "ICU-1234 Fix xyz"
|
||||
- [ ] Required: The PR description must include the link to the Jira Issue, for example by completing the URL in the first checklist item
|
||||
- [ ] Required: Each commit message must be prefixed with a JIRA Issue number. Example: "ICU-1234 Fix xyz"
|
||||
- [ ] Issue accepted (done by Technical Committee after discussion)
|
||||
- [ ] Tests included, if applicable
|
||||
|
|
64
.github/workflows/brs-commit-checker.yml
vendored
Normal file
64
.github/workflows/brs-commit-checker.yml
vendored
Normal file
|
@ -0,0 +1,64 @@
|
|||
name: BRS Commit Checker Report
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
fix_version:
|
||||
type: string
|
||||
required: true
|
||||
description: The ICU Jira "Fix Version" semver
|
||||
from_git_ref:
|
||||
type: string
|
||||
required: true
|
||||
description: The git ref start of comparison range. Prefix branches with `origin/`.
|
||||
end_git_ref:
|
||||
type: string
|
||||
required: true
|
||||
description: The git ref end of comparison range. Must be descendant of `from_git_ref`. Prefix branches with `origin/`.
|
||||
# Jira user name & API token is used for processing sensitive tickets comes from Github Secrets
|
||||
# stored in the repository
|
||||
|
||||
jobs:
|
||||
commit-report:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-tags: true
|
||||
fetch-depth: 0
|
||||
# workaround for bug in checkout action. this step should be redundant.
|
||||
# https://github.com/actions/checkout/issues/1471
|
||||
# https://github.com/actions/checkout/issues/1781
|
||||
# https://github.com/actions/checkout/issues/701#issuecomment-1133937950
|
||||
- name: Fetch all tags
|
||||
run: |
|
||||
git fetch --tags origin
|
||||
- name: Fetch all branches
|
||||
run: |
|
||||
git fetch origin
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.12.8'
|
||||
cache: 'pipenv'
|
||||
cache-dependency-path: |
|
||||
tools/commit-checker/Pipfile
|
||||
tools/commit-checker/Pipfile.lock
|
||||
- name: Install pipenv
|
||||
run: |
|
||||
sudo pip3 install pipenv
|
||||
- name: Generate report
|
||||
env:
|
||||
JIRA_USERNAME: ${{ secrets.COMMIT_CHECKER_JIRA_EMAIL }}
|
||||
JIRA_PASSWORD: ${{ secrets.COMMIT_CHECKER_JIRA_TOKEN }}
|
||||
run: |
|
||||
pushd ./tools/commit-checker
|
||||
pipenv install
|
||||
pipenv run python3 check.py \
|
||||
--jira-query "project=ICU AND fixVersion=${{ inputs.fix_version }}" \
|
||||
--rev-range "${{ inputs.from_git_ref }}..${{ inputs.end_git_ref }}" > REPORT.md
|
||||
popd
|
||||
# https://github.blog/news-insights/product-news/supercharging-github-actions-with-job-summaries/
|
||||
- name: Reproduce report as workflow job summary
|
||||
run: |
|
||||
cat ./tools/commit-checker/REPORT.md >> $GITHUB_STEP_SUMMARY
|
||||
echo "View the Summary page of this GHA Workflow instance to view the rendered Markdown of this report."
|
8
.github/workflows/cache_retain.yml
vendored
8
.github/workflows/cache_retain.yml
vendored
|
@ -35,7 +35,11 @@ permissions:
|
|||
jobs:
|
||||
retain-maven-cache:
|
||||
name: Run all tests with Maven
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
# Only run this on the upstream repo. Otherwise, running in a personal fork will cause
|
||||
# Github to disable the personal fork copy of the workflow
|
||||
# (Github complains about running a scheduled workflow on a repo with > 60 days of inactivity)
|
||||
if: github.ref == 'refs/heads/main' && github.repository == 'unicode-org/unicodetools'
|
||||
steps:
|
||||
- name: Checkout and setup
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
|
@ -48,7 +52,7 @@ jobs:
|
|||
distribution: 'temurin'
|
||||
java-version: '11'
|
||||
- name: Restore read-only cache of local Maven repository
|
||||
uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
|
||||
uses: actions/cache/restore@v4.2.0
|
||||
id: cache
|
||||
with:
|
||||
path: ~/.m2/repository
|
||||
|
|
4
.github/workflows/cifuzz.yml
vendored
4
.github/workflows/cifuzz.yml
vendored
|
@ -26,7 +26,7 @@ on:
|
|||
permissions: {}
|
||||
jobs:
|
||||
Fuzzing:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
permissions:
|
||||
security-events: write
|
||||
strategy:
|
||||
|
@ -55,7 +55,7 @@ jobs:
|
|||
path: ./out/artifacts
|
||||
- name: Upload Sarif
|
||||
if: always() && steps.build.outcome == 'success'
|
||||
uses: github/codeql-action/upload-sarif@v3.26.6
|
||||
uses: github/codeql-action/upload-sarif@v3.28.10
|
||||
with:
|
||||
# Path to SARIF file relative to the root of the repository
|
||||
sarif_file: cifuzz-sarif/results.sarif
|
||||
|
|
88
.github/workflows/icu4c.yml
vendored
88
.github/workflows/icu4c.yml
vendored
|
@ -42,7 +42,7 @@ jobs:
|
|||
|
||||
# ICU4C docs build using doxygen..
|
||||
icu4c-docs-build:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
steps:
|
||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
|
||||
|
@ -53,7 +53,7 @@ jobs:
|
|||
./runConfigureICU Linux --disable-renaming;
|
||||
# Fail if 'warning:' appears in doxygen's output, but ignore warnings from file Doxyfile.
|
||||
# Regex note: (?! ... ) is a negative lookahead. Succeed if the pattern is not present.
|
||||
set +o pipefail && make doc 2>&1 | tee doxygen.log && ( ! grep -P 'warning:(?! .* file .?Doxyfile)' doxygen.log )
|
||||
set +o pipefail && make doc-searchengine 2>&1 | tee doxygen.log && ( ! grep -P 'warning:(?! .* file .?Doxyfile)' doxygen.log )
|
||||
|
||||
# gcc debug build.
|
||||
# Includes dependency checker.
|
||||
|
@ -65,12 +65,14 @@ jobs:
|
|||
#
|
||||
# Invokes test/hdrtst to check public headers compliance.
|
||||
gcc-debug-build-and-test:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
steps:
|
||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
|
||||
- name: ICU4C with gcc
|
||||
env:
|
||||
CXXFLAGS: -Wextra -Werror -Wno-error=return-local-addr
|
||||
CFLAGS: -Werror
|
||||
PREFIX: /tmp/icu-prefix
|
||||
run: |
|
||||
mkdir build;
|
||||
|
@ -83,7 +85,7 @@ jobs:
|
|||
|
||||
#gcc 11 with c++ 20
|
||||
gcc11-cpp20:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
steps:
|
||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
- name: Install GCC-11
|
||||
|
@ -108,7 +110,7 @@ jobs:
|
|||
# (FORCE guards make this tool pass but won't compile to working code.
|
||||
# See the testtagsguards.sh script for details.)
|
||||
clang-release-build-and-test:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
steps:
|
||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
|
||||
|
@ -156,7 +158,7 @@ jobs:
|
|||
build_option:
|
||||
[ --enable-static, --enable-static --disable-shared ]
|
||||
# --disable-shared has a build problem.
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
steps:
|
||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
|
||||
|
@ -172,7 +174,7 @@ jobs:
|
|||
|
||||
# Out of source build with gcc 10, c++14, and extra warnings; executes icuinfo.
|
||||
gcc-10-stdlib17:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
steps:
|
||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
|
||||
|
@ -193,7 +195,7 @@ jobs:
|
|||
|
||||
# Clang Linux with address sanitizer.
|
||||
clang-asan:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
steps:
|
||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
|
||||
|
@ -207,7 +209,7 @@ jobs:
|
|||
LDFLAGS: -fsanitize=address
|
||||
# Clang Linux with leak sanitizer.
|
||||
clang-lsan:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
steps:
|
||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
|
||||
|
@ -222,7 +224,7 @@ jobs:
|
|||
ASAN_OPTIONS: detect_leaks=1
|
||||
# Clang Linux with undefined-behavior sanitizer.
|
||||
clang-ubsan:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
steps:
|
||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
|
||||
|
@ -237,7 +239,7 @@ jobs:
|
|||
LDFLAGS: -fsanitize=undefined -fsanitize=alignment -fno-sanitize-recover=undefined,alignment
|
||||
# Control Flow Integrity.
|
||||
clang-cfi:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
steps:
|
||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
|
||||
|
@ -256,7 +258,7 @@ jobs:
|
|||
|
||||
# Clang Linux with thread sanitizer.
|
||||
clang-tsan:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
steps:
|
||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
|
||||
|
@ -278,7 +280,7 @@ jobs:
|
|||
# this check became flaky. The build apparently was not done copying one or another .ucm file before
|
||||
# calling makeconv for it, although the Makefile has appropriate dependencies.
|
||||
clang-datafilter:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
steps:
|
||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
- name: Extract ICU version
|
||||
|
@ -300,7 +302,7 @@ jobs:
|
|||
|
||||
# Clang Linux with CPP 17
|
||||
clang-cpp17:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
steps:
|
||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
- name: Build ICU4C with CPP 17
|
||||
|
@ -311,7 +313,7 @@ jobs:
|
|||
|
||||
# Clang Linux with LANG: en_US@calendar=gregorian;hours=h12
|
||||
clang-lang-with-extn-tags:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
steps:
|
||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
- name: Linux Clang - LANG has extension tags
|
||||
|
@ -322,7 +324,7 @@ jobs:
|
|||
|
||||
# Clang Linux 18 with CPP20 and treat warnings as errors
|
||||
clang18-cpp20-warning-as-errors:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
|
@ -347,7 +349,7 @@ jobs:
|
|||
|
||||
# MacOS with clang
|
||||
macos-clang:
|
||||
runs-on: macos-latest
|
||||
runs-on: macos-14 # Updated in BRS
|
||||
steps:
|
||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
- name: ICU4C with clang on MacOS
|
||||
|
@ -360,7 +362,7 @@ jobs:
|
|||
|
||||
# Windows MSVC builds
|
||||
windows-msvc:
|
||||
runs-on: windows-2022
|
||||
runs-on: windows-2022 # Updated in BRS
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
|
@ -381,10 +383,10 @@ jobs:
|
|||
uses: microsoft/setup-msbuild@v2
|
||||
- name: Build Solution x64
|
||||
if: contains(matrix.test_flags, 'arm Release')
|
||||
run: msbuild icu4c/source/allinone/allinone.sln /p:Configuration=Release /p:Platform=x64
|
||||
run: msbuild icu4c/source/allinone/allinone.sln /p:Configuration=Release /p:Platform=x64 /p:SkipUWP=true
|
||||
- name: Build Solution
|
||||
run: |
|
||||
msbuild icu4c/source/allinone/allinone.sln ${{ matrix.build_flags }}
|
||||
msbuild icu4c/source/allinone/allinone.sln ${{ matrix.build_flags }} /p:SkipUWP=true
|
||||
- name: Run ${{ matrix.test_flags }} Tests (icucheck.bat)
|
||||
if: contains(matrix.test_flags, 'arm Release') == false
|
||||
run: |
|
||||
|
@ -392,7 +394,7 @@ jobs:
|
|||
|
||||
# Windows data filter build
|
||||
windows-msvc-datafilter:
|
||||
runs-on: windows-latest
|
||||
runs-on: windows-2022 # Updated in BRS
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
|
@ -408,7 +410,7 @@ jobs:
|
|||
|
||||
# Windows MSVC distribution release
|
||||
windows-msvc-dist-release:
|
||||
runs-on: windows-latest
|
||||
runs-on: windows-2022 # Updated in BRS
|
||||
permissions:
|
||||
contents: write # So that we can upload to release
|
||||
timeout-minutes: 30
|
||||
|
@ -431,9 +433,9 @@ jobs:
|
|||
uses: microsoft/setup-msbuild@v2
|
||||
- name: Build Solution x64
|
||||
if: contains(matrix.win_ver, 'ARM64')
|
||||
run: msbuild icu4c/source/allinone/allinone.sln /p:Configuration=Release /p:Platform=x64
|
||||
run: msbuild icu4c/source/allinone/allinone.sln /p:Configuration=Release /p:Platform=x64 /p:SkipUWP=true
|
||||
- name: Build Solution
|
||||
run: msbuild icu4c/source/allinone/allinone.sln /p:Configuration=Release /p:Platform=${{ matrix.plat }}
|
||||
run: msbuild icu4c/source/allinone/allinone.sln /p:Configuration=Release /p:Platform=${{ matrix.plat }} /p:SkipUWP=true
|
||||
- name: Run Tests (icucheck.bat)
|
||||
if: contains(matrix.win_ver, 'ARM64') == false
|
||||
run: icu4c/source/allinone/icucheck.bat ${{ matrix.arch }} Release
|
||||
|
@ -480,7 +482,7 @@ jobs:
|
|||
|
||||
# Window MSYS2 tests
|
||||
windows-msys2-gcc-x86_64:
|
||||
runs-on: windows-latest
|
||||
runs-on: windows-2022 # Updated in BRS
|
||||
timeout-minutes: 45
|
||||
defaults:
|
||||
run:
|
||||
|
@ -517,7 +519,7 @@ jobs:
|
|||
|
||||
# Run ICU4C tests with stubdata.
|
||||
run-with-stubdata:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
steps:
|
||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
|
||||
|
@ -560,7 +562,7 @@ jobs:
|
|||
|
||||
# Test U_CHARSET_IS_UTF8
|
||||
u-charset-is-utf8-test:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
steps:
|
||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
- run: |
|
||||
|
@ -570,7 +572,7 @@ jobs:
|
|||
|
||||
# Test U_OVERRIDE_CXX_ALLOCATION-is-0-test
|
||||
u-override-cxx-allocation-is-0-test:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
steps:
|
||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
- run: |
|
||||
|
@ -581,7 +583,7 @@ jobs:
|
|||
|
||||
# Test LSTM
|
||||
lstm-test:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
steps:
|
||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
- run: |
|
||||
|
@ -592,7 +594,7 @@ jobs:
|
|||
|
||||
# Test adaboost
|
||||
adaboost-test:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
steps:
|
||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
- run: |
|
||||
|
@ -603,7 +605,7 @@ jobs:
|
|||
|
||||
# Build and run testmap
|
||||
testmap:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
steps:
|
||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
- run: |
|
||||
|
@ -616,28 +618,28 @@ jobs:
|
|||
|
||||
# Copyright scan
|
||||
copyright-scan:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
steps:
|
||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
- run: perl tools/scripts/cpysearch/cpyscan.pl
|
||||
|
||||
# Check compilation of internal headers.
|
||||
internal-header-compilation:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
steps:
|
||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
- run: cd icu4c/source; test/hdrtst/testinternalheaders.sh
|
||||
|
||||
# Check source files for valid UTF-8 and for absence of BOM.
|
||||
valid-UTF-8-and-no-BOM-check:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
steps:
|
||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
- run: tools/scripts/icu-file-utf8-check.py
|
||||
|
||||
# Run unit tests with UCONFIG_NO_XXX variations.
|
||||
uconfig-unit-tests:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
strategy:
|
||||
# "fail-fast: false" lets other jobs keep running even if the test breaks in some other uconfig.
|
||||
fail-fast: false
|
||||
|
@ -684,7 +686,7 @@ jobs:
|
|||
|
||||
# Run header tests with UCONFIG_NO_XXX variations.
|
||||
uconfig-header-tests:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
strategy:
|
||||
# "fail-fast: false" lets other jobs keep running even if the test breaks in some other uconfig.
|
||||
fail-fast: false
|
||||
|
@ -735,16 +737,16 @@ jobs:
|
|||
|
||||
# Build Unicode update tools
|
||||
unicode-update-tools:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
steps:
|
||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
- uses: bazelbuild/setup-bazelisk@b39c379c82683a5f25d34f0d062761f62693e0b2 # v3.0.0
|
||||
- uses: bazel-contrib/setup-bazel@0.14.0
|
||||
- name: Get CI Linux runner VM version
|
||||
id: linux-version
|
||||
run: |
|
||||
echo "LINUX_VERSION=$(grep -F VERSION_ID /etc/os-release | cut -d'"' -f2)" >> $GITHUB_OUTPUT
|
||||
- name: Mount bazel cache
|
||||
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
|
||||
uses: actions/cache@v4.2.0
|
||||
with:
|
||||
path: "~/.cache/bazel"
|
||||
key: bazel-${{ runner.os }}-${{ steps.linux-version.outputs.LINUX_VERSION }}
|
||||
|
@ -774,7 +776,7 @@ jobs:
|
|||
|
||||
# Build and run ICU4C samples
|
||||
icu4c-test-samples:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
steps:
|
||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
|
||||
|
@ -799,7 +801,7 @@ jobs:
|
|||
|
||||
# https://unicode-org.github.io/icu/processes/release/tasks/integration.html#verify-that-icu4c-tests-pass-without-collation-rule-strings
|
||||
icu4c-without-collation-rule-strings:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
steps:
|
||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
- name: Install hjson dependency
|
||||
|
@ -839,7 +841,7 @@ jobs:
|
|||
|
||||
# https://unicode-org.github.io/icu/processes/release/tasks/healthy-code.html#test-uconfig_no_conversion
|
||||
icu4c-uconfig-no-conversion:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
steps:
|
||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
- name: Set UCONFIG_NO_CONVERSION and configure ICU4C
|
||||
|
@ -859,7 +861,7 @@ jobs:
|
|||
|
||||
# Workflow for ICU Export Data for ICU4X
|
||||
icu4c-icuexportdata:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
permissions:
|
||||
contents: write # So that we can upload to release
|
||||
timeout-minutes: 30
|
||||
|
|
12
.github/workflows/icu4j.yml
vendored
12
.github/workflows/icu4j.yml
vendored
|
@ -44,7 +44,7 @@ jobs:
|
|||
# This job is created according to the cache strategy of reuse from a single job:
|
||||
# https://github.com/actions/cache/blob/main/caching-strategies.md#make-cache-read-only--reuse-cache-from-centralized-job
|
||||
icu4j-mvn-init-cache:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
steps:
|
||||
- name: Checkout and setup
|
||||
uses: actions/checkout@v4
|
||||
|
@ -60,7 +60,7 @@ jobs:
|
|||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '8'
|
||||
java-version: '11'
|
||||
# Download all of the artifacts needed for the code and build plugins, but
|
||||
# exclude any needed by profiles depending on system artifacts
|
||||
- name: Download all artifacts
|
||||
|
@ -75,8 +75,8 @@ jobs:
|
|||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
java-version: [ '8', '11', '17', '21' ]
|
||||
runs-on: ubuntu-latest
|
||||
java-version: [ '11', '17', '21' ]
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
steps:
|
||||
- name: Checkout and setup
|
||||
uses: actions/checkout@v4
|
||||
|
@ -109,7 +109,7 @@ jobs:
|
|||
lstm-icu4j-build-and-test:
|
||||
if: false # TODO(ICU-22505)
|
||||
needs: icu4j-mvn-init-cache
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
steps:
|
||||
- name: Checkout and setup
|
||||
uses: actions/checkout@v4
|
||||
|
@ -150,7 +150,7 @@ jobs:
|
|||
adaboost-icu4j-build-and-test:
|
||||
if: false # Temporary disable, until we disable the .jar creation from C and distribute the individual files
|
||||
needs: icu4j-mvn-init-cache
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
steps:
|
||||
- name: Checkout and setup
|
||||
uses: actions/checkout@v4
|
||||
|
|
10
.github/workflows/icu_common.yml
vendored
10
.github/workflows/icu_common.yml
vendored
|
@ -33,14 +33,14 @@ jobs:
|
|||
|
||||
# Copyright scan
|
||||
copyright-scan:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- run: perl tools/scripts/cpysearch/cpyscan.pl
|
||||
|
||||
# Check source files for valid UTF-8 and for absence of BOM.
|
||||
valid-UTF-8-and-no-BOM-check:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- run: tools/scripts/icu-file-utf8-check.py
|
||||
|
@ -50,7 +50,7 @@ jobs:
|
|||
# This job is created according to the cache strategy of reuse from a single job:
|
||||
# https://github.com/actions/cache/blob/main/caching-strategies.md#make-cache-read-only--reuse-cache-from-centralized-job
|
||||
icu4j-mvn-init-cache:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
steps:
|
||||
- name: Checkout and setup
|
||||
uses: actions/checkout@v4
|
||||
|
@ -66,7 +66,7 @@ jobs:
|
|||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '8'
|
||||
java-version: '11'
|
||||
# Download all of the artifacts needed for the code and build plugins, but
|
||||
# exclude any needed by profiles depending on system artifacts
|
||||
- name: Download all artifacts
|
||||
|
@ -77,7 +77,7 @@ jobs:
|
|||
# Verify icu4c release tools buildability.
|
||||
icu4c-release-tools:
|
||||
needs: icu4j-mvn-init-cache
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Restore read-only cache of local Maven repository
|
||||
|
|
2
.github/workflows/icu_docs.yml
vendored
2
.github/workflows/icu_docs.yml
vendored
|
@ -37,7 +37,7 @@ jobs:
|
|||
# Keep in sync with deploy workflow in `jekyll-gh-pages.yml`
|
||||
test-docs-build:
|
||||
name: Test build of User Guide docs
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
|
4
.github/workflows/icu_envtest.yml
vendored
4
.github/workflows/icu_envtest.yml
vendored
|
@ -25,7 +25,7 @@ jobs:
|
|||
#=================================================================
|
||||
# locale env tests.
|
||||
env-test-locale:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
strategy:
|
||||
# "fail-fast: false" let other jobs keep running even if the test break in some locales.
|
||||
fail-fast: false
|
||||
|
@ -82,7 +82,7 @@ jobs:
|
|||
#=================================================================
|
||||
# tz env tests.
|
||||
env-test-tz:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
strategy:
|
||||
# "fail-fast: false" let other jobs keep running even if the test break in some timezones.
|
||||
fail-fast: false
|
||||
|
|
4
.github/workflows/icu_exhaustive_tests.yml
vendored
4
.github/workflows/icu_exhaustive_tests.yml
vendored
|
@ -38,7 +38,7 @@ concurrency:
|
|||
jobs:
|
||||
# Runs exhaustive tests for ICU4J on Linux
|
||||
icu4j-linux:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
timeout-minutes: 180
|
||||
steps:
|
||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
|
@ -55,7 +55,7 @@ jobs:
|
|||
|
||||
|
||||
icu4c-linux-clang:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
timeout-minutes: 120
|
||||
steps:
|
||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
|
|
124
.github/workflows/icu_merge_ci.yml
vendored
124
.github/workflows/icu_merge_ci.yml
vendored
|
@ -30,13 +30,13 @@ permissions:
|
|||
jobs:
|
||||
|
||||
# Initialize the Maven artifact cache
|
||||
# Uses Java 8 because Java version not deemed significant for downloading
|
||||
# artifacts
|
||||
# Using Java 11 because Java version is not deemed significant for downloading artifacts,
|
||||
# and is the lowest version we support, so the cached artifacts can be used by any other version.
|
||||
#
|
||||
# This job is created according to the cache strategy of reuse from a single job:
|
||||
# https://github.com/actions/cache/blob/main/caching-strategies.md#make-cache-read-only--reuse-cache-from-centralized-job
|
||||
icu4j-mvn-init-cache:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
steps:
|
||||
- name: Checkout and setup
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
|
@ -45,14 +45,14 @@ jobs:
|
|||
- name: Checkout lfs objects
|
||||
run: git lfs pull
|
||||
- name: Cache local Maven repository
|
||||
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
|
||||
uses: actions/cache@v4.2.0
|
||||
with:
|
||||
path: ~/.m2/repository
|
||||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
||||
- uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '8'
|
||||
java-version: '11'
|
||||
# Download all of the artifacts needed for the code and build plugins
|
||||
- name: Download all artifacts
|
||||
run: |
|
||||
|
@ -62,7 +62,7 @@ jobs:
|
|||
# Test ICU4J with little-endian ICU4C data only
|
||||
icu4j-little-endian-data-test:
|
||||
needs: icu4j-mvn-init-cache
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
steps:
|
||||
- name: Checkout and setup
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
|
@ -71,7 +71,7 @@ jobs:
|
|||
- name: Checkout lfs objects
|
||||
run: git lfs pull
|
||||
- name: Lookup read-only cache of local Maven repository
|
||||
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
|
||||
uses: actions/cache@v4.2.0
|
||||
with:
|
||||
path: ~/.m2/repository
|
||||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
||||
|
@ -97,7 +97,7 @@ jobs:
|
|||
icu4c-store-perf-libs:
|
||||
# Run performance tests only on the main branch of the ICU repository.
|
||||
if: github.repository == 'unicode-org/icu' && github.ref == 'refs/heads/main'
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
steps:
|
||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
|
||||
|
@ -138,13 +138,13 @@ jobs:
|
|||
contents: write
|
||||
deployments: write
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
steps:
|
||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
- name: Create directory for lib files
|
||||
run: mkdir icu4c/source/perflib
|
||||
- name: Get ICU libs
|
||||
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
|
||||
uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806 # v4.1.9
|
||||
with:
|
||||
name: icu-perf-libs
|
||||
path: icu4c/source/lib
|
||||
|
@ -212,13 +212,13 @@ jobs:
|
|||
contents: write
|
||||
deployments: write
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
steps:
|
||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
- name: Create directory for lib files
|
||||
run: mkdir icu4c/source/perflib
|
||||
- name: Get ICU libs
|
||||
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
|
||||
uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806 # v4.1.9
|
||||
with:
|
||||
name: icu-perf-libs
|
||||
path: icu4c/source/lib
|
||||
|
@ -277,13 +277,13 @@ jobs:
|
|||
contents: write
|
||||
deployments: write
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
steps:
|
||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
- name: Create directory for lib files
|
||||
run: mkdir icu4c/source/perflib
|
||||
- name: Get ICU libs
|
||||
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
|
||||
uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806 # v4.1.9
|
||||
with:
|
||||
name: icu-perf-libs
|
||||
path: icu4c/source/lib
|
||||
|
@ -326,7 +326,7 @@ jobs:
|
|||
contents: write
|
||||
deployments: write
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
steps:
|
||||
- name: Checkout and setup
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
|
@ -335,7 +335,7 @@ jobs:
|
|||
- name: Checkout lfs objects
|
||||
run: git lfs pull
|
||||
- name: Lookup read-only cache of local Maven repository
|
||||
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
|
||||
uses: actions/cache@v4.2.0
|
||||
with:
|
||||
path: ~/.m2/repository
|
||||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
||||
|
@ -345,20 +345,16 @@ jobs:
|
|||
- uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '8'
|
||||
java-version: '11'
|
||||
|
||||
- name: Build and run unicodesetperf test
|
||||
run: |
|
||||
# This file needs to be restored otherwise GHA cannot
|
||||
# check-out the perfdata branch. Setting up this task with GH lfs
|
||||
# modifies the file but the details of why and how are unknown.
|
||||
git restore --staged tools/multi/proj/icu4cscan/old-xmls.tar.bz2;
|
||||
git restore tools/multi/proj/icu4cscan/old-xmls.tar.bz2;
|
||||
cd icu4j;
|
||||
mvn ${SHARED_MVN_ARGS} verify -DskipITs -DskipTests;
|
||||
mvn ${SHARED_MVN_ARGS} install -DskipITs -DskipTests;
|
||||
git status
|
||||
cd perf-tests;
|
||||
mkdir -p perf/results/j_unicodesetperf/${{ matrix.perf }};
|
||||
mvn dependency:copy-dependencies
|
||||
java -cp ./target/*:./target/dependency/* com.ibm.icu.dev.test.perf.UnicodeSetPerf ${{ matrix.perf }} -a -t 2 -p 4 [:Lt:] | tee perf/results/j_unicodesetperf/${{ matrix.perf }}/output.txt
|
||||
|
||||
- name: Store performance test results
|
||||
|
@ -388,7 +384,7 @@ jobs:
|
|||
contents: write
|
||||
deployments: write
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
steps:
|
||||
- name: Checkout and setup
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
|
@ -397,7 +393,7 @@ jobs:
|
|||
- name: Checkout lfs objects
|
||||
run: git lfs pull
|
||||
- name: Lookup read-only cache of local Maven repository
|
||||
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
|
||||
uses: actions/cache@v4.2.0
|
||||
with:
|
||||
path: ~/.m2/repository
|
||||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
||||
|
@ -407,19 +403,15 @@ jobs:
|
|||
- uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '8'
|
||||
java-version: '11'
|
||||
|
||||
- name: Build and run ucharacterperf test
|
||||
run: |
|
||||
# This file needs to be restored otherwise GHA cannot
|
||||
# check-out the perfdata branch. Setting up this task with GH lfs
|
||||
# modifies the file but the details of why and how are unknown.
|
||||
git restore --staged tools/multi/proj/icu4cscan/old-xmls.tar.bz2;
|
||||
git restore tools/multi/proj/icu4cscan/old-xmls.tar.bz2;
|
||||
cd icu4j;
|
||||
mvn ${SHARED_MVN_ARGS} verify -DskipITs -DskipTests;
|
||||
mvn ${SHARED_MVN_ARGS} install -DskipITs -DskipTests;
|
||||
cd perf-tests;
|
||||
mkdir -p perf/results/j_ucharacterperf;
|
||||
mvn dependency:copy-dependencies
|
||||
java -cp ./target/*:./target/dependency/* com.ibm.icu.dev.test.perf.UCharacterPerf -a -t 2 -p 4 0 ffff | tee perf/results/j_ucharacterperf/output.txt
|
||||
|
||||
- name: Store performance test results
|
||||
|
@ -452,7 +444,7 @@ jobs:
|
|||
contents: write
|
||||
deployments: write
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
steps:
|
||||
- name: Checkout and setup
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
|
@ -461,7 +453,7 @@ jobs:
|
|||
- name: Checkout lfs objects
|
||||
run: git lfs pull
|
||||
- name: Lookup read-only cache of local Maven repository
|
||||
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
|
||||
uses: actions/cache@v4.2.0
|
||||
with:
|
||||
path: ~/.m2/repository
|
||||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
||||
|
@ -471,23 +463,19 @@ jobs:
|
|||
- uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '8'
|
||||
java-version: '11'
|
||||
|
||||
- name: Build and run decimalformatperf
|
||||
run: |
|
||||
# This file needs to be restored otherwise GHA cannot
|
||||
# check-out the perfdata branch. Setting up this task with GH lfs
|
||||
# modifies the file but the details of why and how are unknown.
|
||||
git restore --staged tools/multi/proj/icu4cscan/old-xmls.tar.bz2;
|
||||
git restore tools/multi/proj/icu4cscan/old-xmls.tar.bz2;
|
||||
cd icu4j;
|
||||
mvn ${SHARED_MVN_ARGS} verify -DskipITs -DskipTests;
|
||||
mvn ${SHARED_MVN_ARGS} install -DskipITs -DskipTests;
|
||||
cd perf-tests;
|
||||
mkdir -p perf/results/j_decimalformatperf/${{ matrix.locale }}/${{ matrix.perf }};
|
||||
# Delay execution by random number of seconds. Spreading execution of multiple
|
||||
# tests over 180 secs. minimizes the possibility of push conflicts when storing
|
||||
# tests results in the data branch.
|
||||
sleep $(($RANDOM % 180));
|
||||
mvn dependency:copy-dependencies
|
||||
java -cp ./target/*:./target/dependency/* com.ibm.icu.dev.test.perf.DecimalFormatPerformanceTest ${{ matrix.perf }} -a -t 2 -p 4 -L ${{ matrix.locale }} "#,###.##" "1.234,56" -r 1 | tee perf/results/j_decimalformatperf/${{ matrix.locale }}/${{ matrix.perf }}/output.txt
|
||||
|
||||
- name: Store performance test results
|
||||
|
@ -521,7 +509,7 @@ jobs:
|
|||
contents: write
|
||||
deployments: write
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
steps:
|
||||
- name: Checkout and setup
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
|
@ -530,7 +518,7 @@ jobs:
|
|||
- name: Checkout lfs objects
|
||||
run: git lfs pull
|
||||
- name: Lookup read-only cache of local Maven repository
|
||||
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
|
||||
uses: actions/cache@v4.2.0
|
||||
with:
|
||||
path: ~/.m2/repository
|
||||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
||||
|
@ -540,25 +528,21 @@ jobs:
|
|||
- uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '8'
|
||||
java-version: '11'
|
||||
|
||||
- name: Build and run normperf
|
||||
env:
|
||||
DATA_FILE_PATH: data/collation
|
||||
run: |
|
||||
# This file needs to be restored otherwise GHA cannot
|
||||
# check-out the perfdata branch. Setting up this task with GH lfs
|
||||
# modifies the file but the details of why and how are unknown.
|
||||
git restore --staged tools/multi/proj/icu4cscan/old-xmls.tar.bz2;
|
||||
git restore tools/multi/proj/icu4cscan/old-xmls.tar.bz2;
|
||||
cd icu4j;
|
||||
mvn ${SHARED_MVN_ARGS} verify -DskipITs -DskipTests;
|
||||
mvn ${SHARED_MVN_ARGS} install -DskipITs -DskipTests;
|
||||
cd perf-tests;
|
||||
mkdir -p perf/results/j_normperf/${{ matrix.source_text }}/${{ matrix.perf }};
|
||||
# Delay execution by random number of seconds. Spreading execution of multiple
|
||||
# tests over 180 secs. minimizes the possibility of push conflicts when storing
|
||||
# tests results in the data branch.
|
||||
sleep $(($RANDOM % 180));
|
||||
mvn dependency:copy-dependencies
|
||||
java -cp ./target/*:./target/dependency/* com.ibm.icu.dev.test.perf.NormalizerPerformanceTest ${{ matrix.perf }} -a -t 2 -p 4 -f $DATA_FILE_PATH/${{ matrix.source_text }}.txt -e UTF-8 ${{ matrix.mode }} | tee perf/results/j_normperf/${{ matrix.source_text }}/${{ matrix.perf }}/output.txt
|
||||
cat perf/results/j_normperf/${{ matrix.source_text }}/${{ matrix.perf }}/output.txt
|
||||
|
||||
|
@ -660,7 +644,7 @@ jobs:
|
|||
contents: write
|
||||
deployments: write
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
steps:
|
||||
- name: Checkout and setup
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
|
@ -669,7 +653,7 @@ jobs:
|
|||
- name: Checkout lfs objects
|
||||
run: git lfs pull
|
||||
- name: Lookup read-only cache of local Maven repository
|
||||
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
|
||||
uses: actions/cache@v4.2.0
|
||||
with:
|
||||
path: ~/.m2/repository
|
||||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
||||
|
@ -679,26 +663,22 @@ jobs:
|
|||
- uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '8'
|
||||
java-version: '11'
|
||||
|
||||
- name: Build and run converterperf
|
||||
env:
|
||||
DATA_FILE_PATH: data/conversion
|
||||
run: |
|
||||
# This file needs to be restored otherwise GHA cannot
|
||||
# check-out the perfdata branch. Setting up this task with GH lfs
|
||||
# modifies the file but the details of why and how are unknown.
|
||||
git restore --staged tools/multi/proj/icu4cscan/old-xmls.tar.bz2;
|
||||
git restore tools/multi/proj/icu4cscan/old-xmls.tar.bz2;
|
||||
cd icu4j;
|
||||
mvn ${SHARED_MVN_ARGS} verify -DskipITs -DskipTests;
|
||||
mvn ${SHARED_MVN_ARGS} install -DskipITs -DskipTests;
|
||||
cd perf-tests;
|
||||
mkdir -p perf/results/j_converterperf/${{ matrix.source_text }}/${{ matrix.test_enc }}/${{ matrix.perf }};
|
||||
# Delay execution by random number of seconds. Spreading execution of multiple
|
||||
# tests over 180 secs. minimizes the possibility of push conflicts when storing
|
||||
# tests results in the data branch.
|
||||
sleep $(($RANDOM % 180));
|
||||
java -cp ./target/*:./target/dependency/*:../main/charset/target/* com.ibm.icu.dev.test.perf.ConverterPerformanceTest ${{ matrix.perf }} -a -t 2 -p 4 -f $DATA_FILE_PATH/${{ matrix.source_text }}.txt -e UTF-8 -T ${{ matrix.test_enc }} | tee perf/results/j_converterperf/${{ matrix.source_text }}/${{ matrix.test_enc }}/${{ matrix.perf }}/output.txt
|
||||
mvn dependency:copy-dependencies
|
||||
java -cp ./target/*:./target/dependency/* com.ibm.icu.dev.test.perf.ConverterPerformanceTest ${{ matrix.perf }} -a -t 2 -p 4 -f $DATA_FILE_PATH/${{ matrix.source_text }}.txt -e UTF-8 -T ${{ matrix.test_enc }} | tee perf/results/j_converterperf/${{ matrix.source_text }}/${{ matrix.test_enc }}/${{ matrix.perf }}/output.txt
|
||||
|
||||
- name: Store performance test results
|
||||
uses: gregtatum/github-action-benchmark@d3f06f738e9612988d575db23fae5ca0008d3d12
|
||||
|
@ -743,7 +723,7 @@ jobs:
|
|||
contents: write
|
||||
deployments: write
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
steps:
|
||||
- name: Checkout and setup
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
|
@ -752,7 +732,7 @@ jobs:
|
|||
- name: Checkout lfs objects
|
||||
run: git lfs pull
|
||||
- name: Lookup read-only cache of local Maven repository
|
||||
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
|
||||
uses: actions/cache@v4.2.0
|
||||
with:
|
||||
path: ~/.m2/repository
|
||||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
||||
|
@ -762,7 +742,7 @@ jobs:
|
|||
- uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '8'
|
||||
java-version: '11'
|
||||
|
||||
- name: Extract identifying digit and parameter.
|
||||
run: |
|
||||
|
@ -771,19 +751,15 @@ jobs:
|
|||
echo "DDIR=${ddir: -1}" >> $GITHUB_ENV
|
||||
- name: Build and run dateformatperf
|
||||
run: |
|
||||
# This file needs to be restored otherwise GHA cannot
|
||||
# check-out the perfdata branch. Setting up this task with GH lfs
|
||||
# modifies the file but the details of why and how are unknown.
|
||||
git restore --staged tools/multi/proj/icu4cscan/old-xmls.tar.bz2
|
||||
git restore tools/multi/proj/icu4cscan/old-xmls.tar.bz2
|
||||
cd icu4j;
|
||||
mvn ${SHARED_MVN_ARGS} verify -DskipITs -DskipTests;
|
||||
mvn ${SHARED_MVN_ARGS} install -DskipITs -DskipTests;
|
||||
cd perf-tests;
|
||||
mkdir -p perf/results/j_dateformatperf/${{ matrix.locale }}/${{ matrix.perf }}/${{ env.DDIR }};
|
||||
# Delay execution by random number of seconds. Spreading execution of multiple
|
||||
# tests over 180 secs. minimizes the possibility of push conflicts when storing
|
||||
# tests results in the data branch.
|
||||
sleep $(($RANDOM % 180));
|
||||
mvn dependency:copy-dependencies
|
||||
java -cp ./target/*:./target/dependency/* com.ibm.icu.dev.test.perf.DateFormatPerformanceTest ${{ matrix.perf }} -a -t 2 -p 4 -L ${{ matrix.locale }} ${{ env.PARM }} -r 1 | tee perf/results/j_dateformatperf/${{ matrix.locale }}/${{ matrix.perf }}/${{ env.DDIR }}/output.txt
|
||||
|
||||
- name: Store performance test results
|
||||
|
@ -807,7 +783,7 @@ jobs:
|
|||
if: github.repository == 'unicode-org/icu' && github.ref == 'refs/heads/main'
|
||||
name: Copy perf data to remote repo for visualization
|
||||
needs: [icu4c-performance-tests, icu4c-performance-tests-with-files, icu4c-strsrchperf, icu4j-unicodesetperf, icu4j-ucharacterperf, icu4j-decimalformatperf, icu4j-normperf, icu4j-converterperf, icu4j-dateformatperf]
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
steps:
|
||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
|
||||
|
@ -827,7 +803,7 @@ jobs:
|
|||
|
||||
# Build ICU and tests sample on some windows configurations
|
||||
icu4c-windows-msvc-postmerge:
|
||||
runs-on: windows-2022
|
||||
runs-on: windows-2022 # Updated in BRS
|
||||
timeout-minutes: 30
|
||||
strategy:
|
||||
matrix:
|
||||
|
@ -843,16 +819,16 @@ jobs:
|
|||
- name: Set up MSBuild
|
||||
uses: microsoft/setup-msbuild@v2
|
||||
- name: Build Solution
|
||||
run: msbuild icu4c/source/allinone/allinone.sln /p:Configuration=${{ matrix.config }} /p:Platform=${{ matrix.platform }}
|
||||
run: msbuild icu4c/source/allinone/allinone.sln /p:Configuration=${{ matrix.config }} /p:Platform=${{ matrix.platform }} /p:SkipUWP=true
|
||||
- name: Run Tests (icucheck.bat)
|
||||
run: icu4c/source/allinone/icucheck.bat ${{ matrix.arch }} ${{ matrix.config }}
|
||||
- name: Build Sample Solution
|
||||
run: msbuild icu4c/source/samples/all/all.sln /p:Configuration=${{ matrix.config }} /p:Platform=${{ matrix.arch }}
|
||||
run: msbuild icu4c/source/samples/all/all.sln /p:Configuration=${{ matrix.config }} /p:Platform=${{ matrix.arch }} /p:SkipUWP=true
|
||||
- name: Test Samples (samplecheck.bat)
|
||||
run: icu4c/source/samples/all/samplecheck.bat ${{ matrix.arch }} ${{ matrix.config }}
|
||||
|
||||
icu4c-windows-cygwin-gcc:
|
||||
runs-on: windows-latest
|
||||
runs-on: windows-2022 # Updated in BRS
|
||||
timeout-minutes: 50
|
||||
env:
|
||||
ICU_CI_CACHE: c:\icu-ci-cache
|
||||
|
|
4
.github/workflows/icu_valgrind.yml
vendored
4
.github/workflows/icu_valgrind.yml
vendored
|
@ -34,7 +34,7 @@ permissions:
|
|||
|
||||
jobs:
|
||||
clang-valgrind-test:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
steps:
|
||||
- name: Install valgrind
|
||||
run: |
|
||||
|
@ -72,7 +72,7 @@ jobs:
|
|||
--show-reachable=yes ./icuinfo;
|
||||
|
||||
clang-valgrind-intltest:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
strategy:
|
||||
# "fail-fast: false" lets other jobs keep running even if the test breaks in some other test.
|
||||
fail-fast: false
|
||||
|
|
4
.github/workflows/jekyll-gh-pages.yml
vendored
4
.github/workflows/jekyll-gh-pages.yml
vendored
|
@ -34,7 +34,7 @@ jobs:
|
|||
# Build job
|
||||
# Keep in sync with docs test workflow in `icu_docs.yml`
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
|
@ -71,7 +71,7 @@ jobs:
|
|||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
needs: build
|
||||
steps:
|
||||
- name: Deploy to GitHub Pages
|
||||
|
|
2
.github/workflows/maven.yaml
vendored
2
.github/workflows/maven.yaml
vendored
|
@ -14,7 +14,7 @@ permissions:
|
|||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
permissions:
|
||||
packages: write
|
||||
outputs:
|
||||
|
|
2
.github/workflows/release-check-sign.yml
vendored
2
.github/workflows/release-check-sign.yml
vendored
|
@ -13,7 +13,7 @@ env:
|
|||
jobs:
|
||||
sign_and_checksums:
|
||||
if: ${{ inputs.gitReleaseTag && startsWith(inputs.gitReleaseTag, 'release-') }}
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
environment: release-env
|
||||
|
||||
permissions:
|
||||
|
|
2
.github/workflows/release-icu4c-fedora.yml
vendored
2
.github/workflows/release-icu4c-fedora.yml
vendored
|
@ -16,7 +16,7 @@ env:
|
|||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
environment: release-env
|
||||
|
||||
container:
|
||||
|
|
8
.github/workflows/release-icu4c-ubuntu.yml
vendored
8
.github/workflows/release-icu4c-ubuntu.yml
vendored
|
@ -16,7 +16,7 @@ env:
|
|||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
environment: release-env
|
||||
|
||||
permissions:
|
||||
|
@ -60,14 +60,14 @@ jobs:
|
|||
source /etc/os-release
|
||||
# Get the ICU version in artifact_version
|
||||
source icu4j/releases_tools/shared.sh
|
||||
# Convert 76.1 to 76_1
|
||||
# Convert 77.1 to 77_1
|
||||
underscore_version=$(echo $artifact_version | sed 's/\./_/g')
|
||||
pushd ${RELEASE_FOLDER}
|
||||
tar -czf icu4c-${underscore_version}-Ubuntu${VERSION_ID}-x64.tgz icu
|
||||
rm -fr icu
|
||||
popd
|
||||
mv icu4c/source/dist/icu4c-76_1-d* ${RELEASE_FOLDER}
|
||||
mv icu4c/source/dist/icu4c-76_1-src.* ${RELEASE_FOLDER}
|
||||
mv icu4c/source/dist/icu4c-77_1-d* ${RELEASE_FOLDER}
|
||||
mv icu4c/source/dist/icu4c-77_1-src.* ${RELEASE_FOLDER}
|
||||
|
||||
- name: Upload build results
|
||||
uses: actions/upload-artifact@v4.3.6
|
||||
|
|
4
.github/workflows/release-icu4j-maven.yml
vendored
4
.github/workflows/release-icu4j-maven.yml
vendored
|
@ -39,7 +39,7 @@ env:
|
|||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
environment: release-env
|
||||
|
||||
permissions:
|
||||
|
@ -55,7 +55,7 @@ jobs:
|
|||
- name: Set up JDK
|
||||
uses: actions/setup-java@v4.2.2
|
||||
with:
|
||||
java-version: '8' # The custom Taglets for javadoc (tools/build) are still Java 8. They need updating to use a different JDK version.
|
||||
java-version: '11'
|
||||
distribution: 'temurin'
|
||||
server-id: icu4j-maven-repo # Value of the distributionManagement/repository/id field of the pom.xml
|
||||
server-username: MAVEN_USERNAME # env variable for username in deploy
|
||||
|
|
6
.github/workflows/scorecard.yml
vendored
6
.github/workflows/scorecard.yml
vendored
|
@ -20,7 +20,7 @@ permissions: read-all
|
|||
jobs:
|
||||
analysis:
|
||||
name: Scorecard analysis
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
permissions:
|
||||
# Needed to upload the results to code-scanning dashboard.
|
||||
security-events: write
|
||||
|
@ -34,7 +34,7 @@ jobs:
|
|||
persist-credentials: false
|
||||
|
||||
- name: "Run analysis"
|
||||
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
|
||||
uses: ossf/scorecard-action@f49aabe0b5af0936a0987cfb85d86b75731b0186 # v2.4.1
|
||||
with:
|
||||
results_file: results.sarif
|
||||
results_format: sarif
|
||||
|
@ -59,6 +59,6 @@ jobs:
|
|||
|
||||
# Upload the results to GitHub's code scanning dashboard.
|
||||
- name: "Upload to code-scanning"
|
||||
uses: github/codeql-action/upload-sarif@9b41ced437d4a4f34bf0b740f80b4e52d3c4bccd # v2.25.15
|
||||
uses: github/codeql-action/upload-sarif@83923549f688e42b34d0b90ee94725f7c30532fc # v2.25.15
|
||||
with:
|
||||
sarif_file: results.sarif
|
||||
|
|
4
.github/workflows/wait-for-checks.yml
vendored
4
.github/workflows/wait-for-checks.yml
vendored
|
@ -15,12 +15,12 @@ on:
|
|||
|
||||
jobs:
|
||||
enforce-all-checks:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04 # Updated in BRS
|
||||
permissions:
|
||||
checks: read
|
||||
steps:
|
||||
- name: Wait for Triggered Required GH Checks
|
||||
uses: poseidon/wait-for-status-checks@6988432d64ad3f9c2608db4ca16fded1b7d36ead # v0.5.0
|
||||
uses: poseidon/wait-for-status-checks@899c768d191b56eef585c18f8558da19e1f3e707 # v0.6.0
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
# This regex matches everything since almost all (if not all) CI checks are required.
|
||||
|
|
2
LICENSE
2
LICENSE
|
@ -2,7 +2,7 @@ UNICODE LICENSE V3
|
|||
|
||||
COPYRIGHT AND PERMISSION NOTICE
|
||||
|
||||
Copyright © 2016-2024 Unicode, Inc.
|
||||
Copyright © 2016-2025 Unicode, Inc.
|
||||
|
||||
NOTICE TO USER: Carefully read the following legal agreement. BY
|
||||
DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING DATA FILES, AND/OR
|
||||
|
|
|
@ -110,11 +110,50 @@ These instructions have not yet verified Eclipse's handling of the import of the
|
|||
|
||||
### VS Code
|
||||
|
||||
VS Code's support of Maven projects is not as robust as IntelliJ's when it comes to the non-standard file layout for sources and tests.
|
||||
The Maven support comes from the standard Java extension (which depends on the standard Maven extension) from the extension marketplace.
|
||||
Source and test code files are not recognized properly, and it is not clear how to execute the tests.
|
||||
VS Code's support of Maven projects has not been as robust as IntelliJ's when it comes to multi-module Maven projects such as what ICU4J has.
|
||||
This situation has gotten better recently, and workable solutions are documented below..
|
||||
|
||||
However, a workaround exists for those who want to use VS Code as their preferred editor and still execute commands to recompile or run tests.
|
||||
The Maven extension that is mostly likely to top search result comes from [the Extension Pack for Java extension](https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-pack) that is maintained by the maintainers of VS Code itself. However, this extension and its dependencies do not work together satisfactorily for the ICU4J codebase.
|
||||
Source and test code files are not recognized properly, and it is not clear how to execute the tests.
|
||||
This may improve in the future.
|
||||
|
||||
For now (Jan 2025), there are a couple of different options for running Maven build commands for ICU4J in VS Code.
|
||||
|
||||
#### Install the Java extension from Oracle
|
||||
|
||||
Oracle's [Java extension for VS Code](https://marketplace.visualstudio.com/items?itemName=Oracle.oracle-java) includes support for Maven projects, including multi-module Maven projects.
|
||||
|
||||
You can view the Java extension's view of the Maven project through the "Projects" tab of the workspace explorer accordion widget.
|
||||
The project will display the list of Maven sub-modules.
|
||||
Within a submodule, click on "Source Pakcages" to view the Java class packages.
|
||||
From there, you can navigate to specific classes according to the package structure.
|
||||
|
||||
> :point_right: **Note**: This extension will use the version of Java according to the location of Java that you have defined in your `JAVA_HOME` system environment variable.
|
||||
|
||||
> :point_right: **Note**: You will also need the Maven command (`mvn`) in your `PATH` system environment variable for the extension to work.
|
||||
|
||||

|
||||
|
||||
To run all of the tests in a Maven submodule, right-click on the module and selecting "Test Project".
|
||||
|
||||

|
||||
|
||||
To run all of the tests in a single test class, open the test class, and click on the triangular play button on level with the class declaration line. You can right click on that button to run in debug mode and enable other options.
|
||||
|
||||
Every individual test will have a similar button on level with the test signature to run only that one test.
|
||||
|
||||

|
||||
|
||||
The output for a test run invocation will appear in the Debug Console tab of the bottom panel.
|
||||
|
||||
> :point_right: **Note**: In the Test Results tab, if the the formatting of the output that is provided per test is not formatted correctly, it may be related to formatting in the Maven CLI command's output (ex: allowing ANSI color code escape characters, which some system's Maven installtions enable by default).
|
||||
|
||||

|
||||
|
||||
#### Run Maven shell commands with a command palette
|
||||
|
||||
If none of the Java/Maven extensions for VS Code work with your instance of VS Code,
|
||||
there is still a way to execute commands to recompile or run tests.
|
||||
The workaround relies on invoking the Maven commands in a shell, and using a VS Code extension to create shortcuts within the IDE to invoke those commands.
|
||||
|
||||
The extension is [Command Runner](https://marketplace.visualstudio.com/items?itemName=edonet.vscode-command-runner).
|
BIN
docs/devsetup/java/maven/open-sources-uniset.png
Normal file
BIN
docs/devsetup/java/maven/open-sources-uniset.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 347 KiB |
BIN
docs/devsetup/java/maven/run-tests-main-core.png
Normal file
BIN
docs/devsetup/java/maven/run-tests-main-core.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 83 KiB |
BIN
docs/devsetup/java/maven/test-class-run-all-tests.png
Normal file
BIN
docs/devsetup/java/maven/test-class-run-all-tests.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 316 KiB |
BIN
docs/devsetup/java/maven/test-class-run-tests-result.png
Normal file
BIN
docs/devsetup/java/maven/test-class-run-tests-result.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 295 KiB |
|
@ -1,8 +1,9 @@
|
|||
---
|
||||
layout: default
|
||||
title: ICU 76
|
||||
nav_order: 9999
|
||||
nav_order: 900
|
||||
has_children: false
|
||||
parent: Downloading ICU
|
||||
---
|
||||
|
||||
<!--
|
||||
|
@ -10,8 +11,6 @@ has_children: false
|
|||
License & terms of use: http://www.unicode.org/copyright.html
|
||||
-->
|
||||
|
||||
<!-- TODO: fix nav_order, add download/index.html, hook into docs/index.md -->
|
||||
|
||||
# ICU 76
|
||||
|
||||
ICU is the [premier library for software internationalization](https://icu.unicode.org/#h.i33fakvpjb7o),
|
||||
|
@ -27,7 +26,7 @@ including new characters and scripts, emoji, collation & IDNA changes, and corre
|
|||
It also updates to
|
||||
[CLDR 46](https://cldr.unicode.org/downloads/cldr-46)
|
||||
([beta blog](https://blog.unicode.org/2024/09/unicode-cldr-46-beta-available-for.html))
|
||||
locale data with new locales, signficant updates to existing locales,
|
||||
locale data with new locales, significant updates to existing locales,
|
||||
and various additions and corrections.
|
||||
For example, the CLDR and Unicode default sort orders are now very nearly the same.
|
||||
|
||||
|
@ -40,6 +39,8 @@ and usable on top of binary stable C APIs, which is a first for ICU.
|
|||
|
||||
The Java and C++ technology preview implementations of the (also in [tech preview](https://github.com/unicode-org/message-format-wg?tab=readme-ov-file#messageformat-2-technical-preview)) CLDR MessageFormat 2.0 specification have been updated to match recent changes.
|
||||
|
||||
ICU 76 and CLDR 46 are major releases, including a new version of Unicode and major locale data improvements.
|
||||
|
||||
For more details, including migration issues, see below.
|
||||
|
||||
Please use the [icu-support mailing list](https://icu.unicode.org/contacts) and/or [find/submit error reports](https://icu.unicode.org/bugs).
|
||||
|
@ -48,7 +49,7 @@ Please use the [icu-support mailing list](https://icu.unicode.org/contacts) and/
|
|||
|
||||
The initial release has library version number 76.1.
|
||||
|
||||
* Release date: _planned for_ 2024-10-24
|
||||
* Release date: 2024-10-24
|
||||
* [List of tickets fixed in ICU 76](https://unicode-org.atlassian.net/issues/?jql=project%20%3D%20ICU%20AND%20status%20%3D%20Done%20AND%20resolution%20in%20%28Fixed%2C%20%22Fixed%20by%20Other%20Ticket%22%29%20AND%20fixVersion%20%3D%2076.1%20ORDER%20BY%20component%20ASC%2C%20created%20DESC)
|
||||
|
||||
If there are maintenance releases, they will be 76.2, 76.3, etc. (During ICU 76 development, the library version number was 76.0.x.)
|
||||
|
@ -99,6 +100,7 @@ Note: There may be additional commits on the [maint/maint-76](https://github.com
|
|||
traditional vs. simplified forms of radicals are now distinguished on a lower level than the number of residual strokes.
|
||||
In alphabetic indexes for radical-stroke sort orders,
|
||||
only the traditional forms of radicals are now available as index characters.
|
||||
* Updated IBM EBCDIC code page 1388 (Simplified Chinese) mapping data to ibm-cp1388_P100-2024 ([ICU-22596](https://unicode-org.atlassian.net/browse/ICU-22596))
|
||||
* Time zone data (tzdata) version 2024b (2024-sep). Note that pre-1970 data for a number of time zones has been removed, as has been the case in the upstream [tzdata](https://www.iana.org/time-zones) release since 2021b.
|
||||
* The Asia/Almaty time zone has become an alias following IANA TZ database changes.
|
||||
* CLDR added support for deprecated timezone codes by remapping:
|
||||
|
@ -144,7 +146,26 @@ Note: There may be additional commits on the [maint/maint-76](https://github.com
|
|||
|
||||
## Known Issues
|
||||
|
||||
* None yet
|
||||
* Some segmentation changes should have been made as part of the Unicode 16 integration,
|
||||
but were delayed to ICU 77:
|
||||
* Word break: Root tailoring of colon reverted, Swedish & Finnish tailorings removed
|
||||
([ICU-22941](https://unicode-org.atlassian.net/browse/ICU-22941))
|
||||
([ICU 77 PR #3249](https://github.com/unicode-org/icu/pull/3249))
|
||||
* These tailorings were introduced in ICU 72, but feedback has been negative,
|
||||
and the UTC declined to adopt these changes.
|
||||
* Updated Indic grapheme clusters to use the latest `Indic_Conjunct_Break` data
|
||||
([ICU-22956](https://unicode-org.atlassian.net/browse/ICU-22956))
|
||||
([ICU 77 PR #3257](https://github.com/unicode-org/icu/pull/3257))
|
||||
* New APIs for colloquial C++ use of C USet ([ICU-22876](https://unicode-org.atlassian.net/browse/ICU-22876))
|
||||
and C UCollator ([ICU-22879](https://unicode-org.atlassian.net/browse/ICU-22879))
|
||||
* Some of the new APIs do not actually compile with `U_SHOW_CPLUSPLUS_API=0`.
|
||||
They have been fixed in ICU 77 and thoroughly tested.
|
||||
([ICU-22954](https://unicode-org.atlassian.net/browse/ICU-22954))
|
||||
* For details about these APIs and an example see the
|
||||
[“C++ Header-Only APIs” section below](#migration-issues).
|
||||
* One late CLDR 46 bug fix was accidentally omitted from ICU 46:
|
||||
[CLDR-18002](https://unicode-org.atlassian.net/browse/CLDR-18002) Fix likely subtag inconsistency
|
||||
([CLDR PR #4105](https://github.com/unicode-org/cldr/pull/4105))
|
||||
|
||||
## Migration Issues
|
||||
|
||||
|
@ -153,7 +174,7 @@ After all major browsers have switched to nontransitional processing,
|
|||
Unicode 15.1 (a year ago) changed the [UTS #46 spec](https://www.unicode.org/reports/tr46/#Processing)
|
||||
to declare transitional processing deprecated.
|
||||
|
||||
ICU 76 changes the "DEFAULT" API constants from 0 to UIDNA_NONTRANSITIONAL_TO_ASCII | UIDNA_NONTRANSITIONAL_TO_UNICODE.
|
||||
ICU 76 changes the "DEFAULT" API constants from 0 to `UIDNA_NONTRANSITIONAL_TO_ASCII | UIDNA_NONTRANSITIONAL_TO_UNICODE`.
|
||||
|
||||
ICU 76 does not change the behavior of using options value 0.
|
||||
(That would change the behavior of existing binaries linking with new ICU libraries.)
|
||||
|
@ -189,6 +210,9 @@ These are C++ definitions that are not exported by the ICU DLLs/libraries,
|
|||
are thus inlined into the calling code,
|
||||
and which may call ICU C APIs but not into ICU non-header-only C++ APIs.
|
||||
|
||||
Note: Some of these new APIs did not actually compile with `U_SHOW_CPLUSPLUS_API=0`.
|
||||
They have been fixed in [ICU 77](77.md) and thoroughly tested.
|
||||
|
||||
The header-only APIs are defined in a nested `header` namespace.
|
||||
If entry point renaming is turned off (the main namespace is `icu` rather than `icu_76` etc.),
|
||||
then the new `U_HEADER_ONLY_NAMESPACE` is `icu::header`.
|
||||
|
@ -241,21 +265,20 @@ ICU4J should work on Android API level 21 and later but may require “[library
|
|||
|
||||
## Download
|
||||
|
||||
Source and binary downloads are available on the git/GitHub tag page: https://github.com/unicode-org/icu/releases/tag/release-76-rc
|
||||
Source and binary downloads are available on the git/GitHub tag page: <https://github.com/unicode-org/icu/releases/tag/release-76-1>
|
||||
|
||||
See the [Source Code Setup](../devsetup/source/) page for how to download the ICU file tree directly from GitHub.
|
||||
|
||||
ICU locale data was generated from CLDR data equivalent to:
|
||||
|
||||
* https://github.com/unicode-org/cldr/releases/tag/release-46-beta3
|
||||
* https://github.com/unicode-org/cldr-staging/releases/tag/release-46-beta3
|
||||
* <https://github.com/unicode-org/cldr/releases/tag/release-46>
|
||||
* <https://github.com/unicode-org/cldr-staging/releases/tag/release-46>
|
||||
|
||||
[Maven dependency](https://central.sonatype.com/artifact/com.ibm.icu/icu4j):
|
||||
TODO
|
||||
```
|
||||
<dependency>
|
||||
<groupId>com.ibm.icu</groupId>
|
||||
<artifactId>icu4j</artifactId>
|
||||
<version>76.1</version>
|
||||
</dependency>
|
||||
```
|
||||
```
|
||||
|
|
155
docs/download/77.md
Normal file
155
docs/download/77.md
Normal file
|
@ -0,0 +1,155 @@
|
|||
---
|
||||
layout: default
|
||||
title: ICU 77
|
||||
nav_order: 899
|
||||
has_children: false
|
||||
parent: Downloading ICU
|
||||
---
|
||||
|
||||
<!--
|
||||
© 2025 and later: Unicode, Inc. and others.
|
||||
License & terms of use: http://www.unicode.org/copyright.html
|
||||
-->
|
||||
|
||||
# ICU 77
|
||||
|
||||
ICU is the [premier library for software internationalization](https://icu.unicode.org/#h.i33fakvpjb7o),
|
||||
used by a [wide array of companies and organizations](https://icu.unicode.org/#h.f9qwubthqabj).
|
||||
|
||||
## Release Overview
|
||||
|
||||
* Download: [releases/tag/release-77-1](https://github.com/unicode-org/icu/releases/tag/release-77-1)
|
||||
* [Maven: com.ibm.icu / icu4j / version 77.1](https://mvnrepository.com/artifact/com.ibm.icu/icu4j/77.1)
|
||||
|
||||
ICU 77 updates to
|
||||
[CLDR 47](https://cldr.unicode.org/downloads/cldr-47)
|
||||
([beta blog](https://blog.unicode.org/2025/02/unicode-cldr-47-beta-available-for.html))
|
||||
locale data with new locales, and various additions and corrections.
|
||||
|
||||
ICU 77 is mostly focused on bug fixes, segmentation conformance, and other refinements.
|
||||
|
||||
The Java technology preview implementation of the CLDR MessageFormat 2.0 specification has been updated to incorporate the
|
||||
[CLDR 46.1 spec](https://www.unicode.org/reports/tr35/tr35-74/tr35-messageFormat.html)
|
||||
plus most but not all of the CLDR 47 changes.
|
||||
|
||||
The C++ technology preview implementation of MessageFormat 2.0 is not yet quite up to date with CLDR 46.1.
|
||||
|
||||
For more details, including migration issues, see below.
|
||||
|
||||
Please use the [icu-support mailing list](https://icu.unicode.org/contacts) and/or [find/submit error reports](https://icu.unicode.org/bugs).
|
||||
|
||||
### Attention: Future Changes
|
||||
|
||||
Beginning with ICU 78 (2025-oct):
|
||||
|
||||
1. We want to move the minimum required Java version from Java 8 to Java 11.
|
||||
This is a significant, useful update in terms of the Java language and
|
||||
standard library, and simplifies ICU tooling which currently uses
|
||||
a mix of Java 8 and Java 11.
|
||||
Note that [Android desugaring](https://developer.android.com/studio/write/java11-default-support-table)
|
||||
supports at least Java 11 since late 2023.\
|
||||
See [ICU-23072](https://unicode-org.atlassian.net/browse/ICU-23072)
|
||||
where you can provide comments.
|
||||
2. We are planning to remove the
|
||||
[ICU4J Locale Service Provider](../userguide/icu4j/locale-service-provider.md)
|
||||
([Maven: com.ibm.icu / icu4j-localespi / version 76.1](https://mvnrepository.com/artifact/com.ibm.icu/icu4j-localespi/76.1)).
|
||||
It is much less useful than when we added it, has very low usage,
|
||||
needs work for newer Java versions, and complicates ICU4J development.\
|
||||
See [ICU-23071](https://unicode-org.atlassian.net/browse/ICU-23071)
|
||||
where you can provide comments.
|
||||
|
||||
### Version Number
|
||||
|
||||
The initial release has library version number 77.1.
|
||||
|
||||
* Release date: 2025-03-13
|
||||
* [List of tickets fixed in ICU 77](https://unicode-org.atlassian.net/issues/?jql=project%20%3D%20ICU%20AND%20status%20%3D%20Done%20AND%20resolution%20in%20%28Fixed%2C%20%22Fixed%20by%20Other%20Ticket%22%29%20AND%20fixVersion%20%3D%2077.1%20ORDER%20BY%20component%20ASC%2C%20created%20DESC)
|
||||
|
||||
If there are maintenance releases, they will be 77.2, 77.3, etc. (During ICU 77 development, the library version number was 77.0.x.)
|
||||
|
||||
Note: There may be additional commits on the [maint/maint-77](https://github.com/unicode-org/icu/tree/maint/maint-77) branch that are not included in the prepackaged download files.
|
||||
|
||||
## Common Changes
|
||||
|
||||
* [CLDR 47](https://cldr.unicode.org/downloads/cldr-47)
|
||||
([beta blog](https://blog.unicode.org/2025/02/unicode-cldr-47-beta-available-for.html)):
|
||||
* No major data collection for existing locales; focus on bug fixes and structural improvements
|
||||
* New regional variants: English in several European countries, and Cantonese in Macau (`yue_Hant_MO`)
|
||||
* Improved RBNF (number spellout) and transliteration data
|
||||
* Subtle segmentation changes to make ICU fully conform to Unicode 16
|
||||
* Word break: Root tailoring of colon reverted, Swedish & Finnish tailorings removed
|
||||
([ICU-22941](https://unicode-org.atlassian.net/browse/ICU-22941))
|
||||
* These tailorings were introduced in ICU 72, but feedback has been negative,
|
||||
and the UTC declined to adopt these changes.
|
||||
* Line break: Fixed a bug in the line breaking of obscure sequences
|
||||
⟨no-break space, combining mark, hyphen, alphabetic character⟩
|
||||
([ICU-22986](https://unicode-org.atlassian.net/browse/ICU-22986)).
|
||||
* Updated Indic grapheme clusters to use the latest `Indic_Conjunct_Break` data
|
||||
([ICU-22956](https://unicode-org.atlassian.net/browse/ICU-22956))
|
||||
* Time zone data (tzdata) version 2025a (2025-jan).
|
||||
|
||||
## ICU4C Specific Changes
|
||||
|
||||
* [API changes since ICU4C 76 (Markdown)](https://github.com/unicode-org/icu/blob/maint/maint-77/icu4c/APIChangeReport.md) / [(HTML)](https://htmlpreview.github.io/?https://github.com/unicode-org/icu/blob/maint/maint-77/icu4c/APIChangeReport.html)
|
||||
* New APIs for colloquial C++ use of C USet ([ICU-22876](https://unicode-org.atlassian.net/browse/ICU-22876))
|
||||
and C UCollator ([ICU-22879](https://unicode-org.atlassian.net/browse/ICU-22879))
|
||||
* These were added in ICU 76, but some of the new APIs did not actually compile with `U_SHOW_CPLUSPLUS_API=0`.
|
||||
They have been fixed in ICU 77 and thoroughly tested.
|
||||
USetElementIterator now returns std::u16string instead of icu::UnicodeString,
|
||||
and therefore it and related APIs have been changed to `@draft ICU 77`.
|
||||
([ICU-22954](https://unicode-org.atlassian.net/browse/ICU-22954))
|
||||
* For details about these APIs and an example see the
|
||||
“C++ Header-Only APIs” section of the [ICU 76 Migration Issues](76.md#migration-issues).
|
||||
|
||||
## ICU4J Specific Changes
|
||||
|
||||
* [API Changes since ICU4J 76](https://htmlpreview.github.io/?https://github.com/unicode-org/icu/blob/maint/maint-77/icu4j/APIChangeReport.html)
|
||||
* The Java technology preview implementation of the CLDR MessageFormat 2.0 specification has been updated to incorporate the
|
||||
[CLDR 46.1 spec](https://www.unicode.org/reports/tr35/tr35-74/tr35-messageFormat.html)
|
||||
plus most but not all of the CLDR 47 changes.
|
||||
|
||||
## Known Issues
|
||||
|
||||
* The new MeasureUnit for `portion-per-1e9` works for formatting,
|
||||
but when the new member function `getConstantDenominator()` is called on this unit,
|
||||
it incorrectly returns 0. ([ICU-23045](https://unicode-org.atlassian.net/browse/ICU-23045))
|
||||
|
||||
## Migration Issues
|
||||
|
||||
* (none yet)
|
||||
|
||||
### Migration Issues Related to CLDR
|
||||
* See [CLDR 47 migration issues](https://cldr.unicode.org/downloads/cldr-47#migration)
|
||||
|
||||
## ICU4C Platform Support
|
||||
|
||||
ICU4C requires C++17 and has been tested with up to C++20.
|
||||
|
||||
We routinely test on recent versions of Linux, macOS, and Windows.
|
||||
|
||||
We accept patches for other platforms.
|
||||
|
||||
Windows: The minimum supported version is Windows 7. (See [How To Build And Install On Windows](../userguide/icu4c/build.html#how-to-build-and-install-on-windows) for more details.)
|
||||
|
||||
## ICU4J Platform Support
|
||||
|
||||
ICU4J works on Java 8..21 (at least).
|
||||
|
||||
ICU4J should work on Android API level 21 and later but may require “[library desugaring](https://developer.android.com/studio/write/java8-support#library-desugaring)”.
|
||||
|
||||
## Download
|
||||
|
||||
### GitHub
|
||||
Source and binary downloads are available on the git/GitHub tag page: <https://github.com/unicode-org/icu/releases/tag/release-77-1>
|
||||
|
||||
See the [Source Code Setup](../devsetup/source/) page for how to download the ICU file tree directly from GitHub.
|
||||
|
||||
ICU locale data was generated from CLDR data equivalent to:
|
||||
|
||||
* <https://github.com/unicode-org/cldr/releases/tag/release-47>
|
||||
* <https://github.com/unicode-org/cldr-staging/releases/tag/release-47>
|
||||
|
||||
### Maven
|
||||
* https://mvnrepository.com/artifact/com.ibm.icu/icu4j/77.1
|
||||
* https://mvnrepository.com/artifact/com.ibm.icu/icu4j-charset/77.1
|
||||
* https://mvnrepository.com/artifact/com.ibm.icu/icu4j-localespi/77.1
|
78
docs/download/index.md
Normal file
78
docs/download/index.md
Normal file
|
@ -0,0 +1,78 @@
|
|||
---
|
||||
layout: default
|
||||
title: Downloading ICU
|
||||
nav_order: 100
|
||||
has_children: true
|
||||
---
|
||||
|
||||
<!--
|
||||
© 2024 and later: Unicode, Inc. and others.
|
||||
License & terms of use: http://www.unicode.org/copyright.html
|
||||
-->
|
||||
|
||||
# Downloading ICU
|
||||
|
||||
If you want to use ICU (as opposed to developing it), it is recommended that you download an official packaged version of the ICU source code. These versions are tested more thoroughly than day-to-day development builds of the system, and they are packaged in zip and tar files for convenient download. Here are several recent releases of ICU that are available:
|
||||
|
||||
## Latest Release
|
||||
|
||||
***2025-03-13: ICU 77 is now available*** —
|
||||
[releases/tag/release-77-1](https://github.com/unicode-org/icu/releases/tag/release-77-1) —
|
||||
[Maven: com.ibm.icu / icu4j / version 77.1](https://mvnrepository.com/artifact/com.ibm.icu/icu4j/77.1)
|
||||
|
||||
[ICU 77](77.md) updates to [CLDR 47](https://cldr.unicode.org/downloads/cldr-47)
|
||||
locale data with new locales, and various additions and corrections.
|
||||
|
||||
ICU 77 is mostly focused on bug fixes, segmentation conformance, and other refinements.
|
||||
The technology preview implementations of the CLDR MessageFormat 2.0 specification have been updated to incorporate some, but not yet all, of the CLDR 47 changes. (Java more than C++)
|
||||
|
||||
## Previous Releases
|
||||
|
||||
- 2024-10-24: **ICU 76** updates to [Unicode 16](https://www.unicode.org/versions/Unicode16.0.0/) ([blog](https://blog.unicode.org/2024/09/announcing-unicode-standard-version-160.html)), including new characters and scripts, emoji, collation & IDNA changes, and corresponding APIs and implementations. It also updates to [CLDR 46](https://cldr.unicode.org/downloads/cldr-46) ([beta blog](https://blog.unicode.org/2024/09/unicode-cldr-46-beta-available-for.html)) locale data with new locales, significant updates to existing locales, and various additions and corrections. For example, the CLDR and Unicode default sort orders are now very nearly the same.
|
||||
- Most of the java.time (Temporal) types can now be formatted directly. There are some new APIs to make ICU easier to use with modern C++ and Java patterns. The Java and C++ technology preview implementations of the CLDR MessageFormat 2.0 specification have been updated to match recent changes. See [ICU 76](76.md).
|
||||
|
||||
- 2024-04-17: **ICU 75** updates to [CLDR 45](https://cldr.unicode.org/index/downloads/cldr-45) ([beta blog](https://blog.unicode.org/2024/04/unicode-cldr-v45-beta-available-for.html)) locale data with new locales and various additions and corrections. C++ code now requires C++17 and is being made more robust. The CLDR MessageFormat 2.0 specification is now in [technology preview](https://github.com/unicode-org/message-format-wg?tab=readme-ov-file#messageformat-2-technical-preview), together with a corresponding update of the ICU4J (Java) tech preview and a new ICU4C (C++) tech preview. See [Downloading ICU > ICU 75](https://icu.unicode.org/download/75).
|
||||
|
||||
- 2023-12-13: **ICU 74.2** released with date/time formatting bug fixes. See [Downloading ICU > ICU 74](https://icu.unicode.org/download/74).
|
||||
|
||||
- 2023-10-31: **ICU 74** updates to [Unicode 15.1](http://blog.unicode.org/2023/09/announcing-unicode-standard-version-151.html), including new characters, emoji, security mechanisms, and corresponding APIs and implementations. It also updates to [CLDR 44](https://cldr.unicode.org/index/downloads/cldr-44) ([blog](https://blog.unicode.org/2023/10/unicode-cldr-v44-available.html)) locale data with new locales and various additions and corrections. See [Downloading ICU > ICU 74](https://icu.unicode.org/download/74).
|
||||
|
||||
- 2023-06-15: **ICU 73.2**: Maintenance release with changes for GB18030 compliance, English AM/PM spaces, word segmentation around @ sign, etc. See [Downloading ICU > ICU 73](https://icu.unicode.org/download/73).
|
||||
|
||||
- 2023-04-13: **ICU 73** updates to [CLDR 43](https://blog.unicode.org/2023/04/the-unicode-cldr-v43-released.html) locale data with various additions and corrections.
|
||||
ICU 73 improves Japanese and Korean short-text line breaking, reduces C++ memory use in date formatting, and promotes the Java person name formatter from tech preview to draft.
|
||||
For details, see [Downloading ICU > ICU 73](https://icu.unicode.org/download/73).
|
||||
|
||||
| Release | ICU4C | ICU4J | Major Changes |
|
||||
| ----- | ----- | ----- | ----- |
|
||||
| [**ICU 72**](https://icu.unicode.org/download/72) | **72.1** | **72.1** | Unicode 15, CLDR 42, tech previews: person name formatting, MessageFormat 2 |
|
||||
| [**ICU 71**](https://icu.unicode.org/download/71) | **71.1** | **71.1** | CLDR 41, phrase-based line breaking for Japanese. |
|
||||
| [**ICU 70**](https://icu.unicode.org/download/70) | **70.1** | **70.1** | Unicode 14 & CLDR 40, emoji properties. |
|
||||
| [**ICU 69**](https://icu.unicode.org/download/69) | **69.1** | **69.1** | CLDR 39, enhancements in measurement unit formatting and number formatting. |
|
||||
| [**ICU 68**](https://icu.unicode.org/download/68) | **68.2** | **68.2** | CLDR 38, locale-dependent smart unit preferences (road distance, temperature, etc.), locale ID canonicalization conformant with CLDR. |
|
||||
| **ICU 67** | [**67.1**](https://icu.unicode.org/download/67#h.ouaur1y940xf) | [**67.1**](https://icu.unicode.org/download/67#h.tfrvsxlm08j1) | Unicode 13 & CLDR 37. Bug fixes for date and number formatting, enhanced support for user preferences in the locale identifier. LocaleMatcher code and data improved. Number skeletons have a new “concise” form that can be used in MessageFormat strings. |
|
||||
| **ICU 66** | [**66.1**](https://icu.unicode.org/download/66#h.udvu1uhvnd81) | [**66.1**](https://icu.unicode.org/download/66#h.4aoltvwuvna5) | Unicode 13 & CLDR 36.1. New, extra Q1 releases for low-risk integration of Unicode 13. |
|
||||
| **ICU 65** | [**65.1**](https://icu.unicode.org/download/65#h.zcdcx3wezhki) | [**65.1**](https://icu.unicode.org/download/65#h.sve2yxt21gko) | CLDR 36 with some new measurement units. Java LocaleMatcher API is improved, and ported to C++. For building ICU data, there are new filtering options, and new tracing support for data loading in ICU4C. |
|
||||
| **ICU 64** | [**64.2**](https://icu.unicode.org/download/64#h.vrjm9tyoew9f) | [**64.2**](https://icu.unicode.org/download/64#h.2p64shtntkxe) | Unicode 12.0, CLDR 35, data filtering/subsetting mechanism, improved formatting API, C++ LocaleBuilder. |
|
||||
| **ICU 63** | [**63.2**](https://icu.unicode.org/download/63#h.u1gym8iosl1f) | [**63.2**](https://icu.unicode.org/download/63#h.ouec4bczpynw) | CLDR 34, API for number & currency *range* formatting, API for additional Unicode properties and for constructing custom properties; test data for upcoming Japanese era; C++ Locale enhancements; Java 7 as minimum runtime. |
|
||||
| **ICU 62** | [**62.2**](https://icu.unicode.org/download/62#h.tesi0q3ajdsl) | [**62.2**](https://icu.unicode.org/download/62#h.aivenafc76s7) | Unicode 11.0, CLDR 33.1, number format skeleton pattern in MessageFormat and ICU4C DecimalFormat wrapping new NumberFormatter implementation. |
|
||||
| **ICU 61** | [**61.2**](https://icu.unicode.org/download/61#h.bv7bijcse9ix) | [**61.2**](https://icu.unicode.org/download/61#h.w7fdpw54xbjz) | CLDR 33, new Java implementation for number and currency parsing, and many small API additions, improvements, and bug fixes. |
|
||||
| **ICU 60** | [**60.3**](https://icu.unicode.org/download/60#h.s3yzinozhocu) | [**60.3**](https://icu.unicode.org/download/60#h.l452u1xfeng2) | Unicode 10.0, CLDR 32, and ICU4J has been tested with Java 9. New API for number formatting, NumberFormatter, which new users should link instead of NumberFormat/DecimalFormat. There are many more features and bug fixes. |
|
||||
| [**ICU 59**](https://icu.unicode.org/download/59) | [**59.2**](https://icu.unicode.org/download/59#h.yksv2zydmofr) | [**59.2**](https://icu.unicode.org/download/59#h.4a4swub5xyga) | CLDR 31, Emoji 5.0 draft data, C++11 support, Java number formatting code rewrite. |
|
||||
| [**ICU 58**](https://icu.unicode.org/download/58) | [**58.3**](https://icu.unicode.org/download/58#h.cii7gzh9hdsi) | [**58.3**](https://icu.unicode.org/download/58#h.yvn5vkyn1ufu) | Unicode 9.0, CLDR 30.0.2, Emoji 4.0 draft data, JUnit test integration, more locale data loading improvements. |
|
||||
| [**ICU 57**](https://icu.unicode.org/download/57) | [**57.2**](https://icu.unicode.org/download/57#h.2orq2dh20i8c) | [**57.2**](https://icu.unicode.org/download/57#h.uclxjlbu3xgz) | CLDR 29, Unicode emoji properties, improved locale data loading. |
|
||||
| [**ICU 56**](https://icu.unicode.org/download/56) | [**56.2**](https://icu.unicode.org/download/56#h.cyht33tccoc0) | [**56.2**](https://icu.unicode.org/download/56#h.jy58dax3hhcr) | Unicode 8.0, CLDR 28, ICU data size reduction, ICU4C DecimalFormat refactoring. |
|
||||
| [**ICU 55**](https://icu.unicode.org/download/55) | [**55.2**](https://sites.google.com/unicode.org/icu/download/55?pli=1#h.o7eux855pigh) | [**55.2**](https://sites.google.com/unicode.org/icu/download/55?pli=1#h.ok82qb3y55ax) | CLDR 27.0.1, CSS line-break support in BreakIterator, easier-to-use ScientificNumberFormatter ("1.2 × 10³"), ICU4C DateFormat performance improvement, C wrapper for ListFormatter and FieldPositionIterator, regex named capture groups. ICU4J has been improved and tested for using ICU4C data and for running on Android. |
|
||||
| [**ICU 54**](https://icu.unicode.org/download/54) | [**54.2**](https://icu.unicode.org/download/54#h.ub64y7kaqos7) | [**54.2**](https://icu.unicode.org/download/54#h.jnbcx7gqiidn) | CLDR 26, Unicode 7.0, many more units, Unihan in root collation, new RBNF PluralFormat syntax, dictionary-based break iterator for Burmese, tech preview of FilteredBreakIterator using ULI break data, time separator configurable from CLDR data, ... |
|
||||
| [**ICU 53**](https://icu.unicode.org/download/53) | [**53.2**](https://icu.unicode.org/download/53#h.kbnahu7jfdg7) | [**53.2**](https://icu.unicode.org/download/53#h.bpcdfe5r3hxl) | CLDR 25, collation code rewrite, measure formatting for various units, relative date formatter and leniency controls in date format parsing |
|
||||
| [**ICU 52**](https://icu.unicode.org/download/52) | [**52.2**](https://icu.unicode.org/download/52#h.clle0zr3jvqx) | [**52.2**](https://icu.unicode.org/download/52#h.ho3jsruxjpyp) | CLDR 24, Unicode 6.3, Plurals for fractional values, Islamic Umm al-Qura calendar, DateFormat parse leniency controls and Lao dictionary based word segmentation. |
|
||||
| [**ICU 51**](https://icu.unicode.org/download/51) | [**51.3**](https://icu.unicode.org/download/51#h.ae67vrvucf1k) | [**51.3**](https://icu.unicode.org/download/51#h.p2kuuvx5ko5z) | CLDR 23, short weekday names, new time zone format patterns, display context for date format and locale display names |
|
||||
| [ICU 50](https://icu.unicode.org/download/50) | [50.2](https://icu.unicode.org/download/50#h.au7pfptnrbk0) | [50.2](https://icu.unicode.org/download/50#h.h2lsiy5b0om3) | CLDR 22.1, Unicode 6.2, ordinal number support, dictionary-based break iterators for Chinese & Japanese… |
|
||||
| [ICU 49](https://icu.unicode.org/download/49) | [49.1.2](https://icu.unicode.org/download/49#h.8kgchrymg08d) | [49.1](https://icu.unicode.org/download/49#h.plyzynidar2c) | CLDR 21.0.1, Unicode 6.1, simpler ICU4C build without generated platform.h, many small API additions |
|
||||
| | | | Note: We have changed the [ICU release version numbering](https://unicode-org.github.io/icu/userguide/icu/design.html#version-numbers-in-icu) , combining the former first two fields into one, thus the major release sequence is ICU 4.8, ICU 49, ICU 50, … |
|
||||
|
||||
For more details on building ICU once you've checked out the code, please see the ICU4C or ICU4J readme (linked from the nav bar).
|
||||
|
||||
Note: In 2012, starting with [ICU 49](https://icu.unicode.org/download/49), we changed the [ICU release version numbering](https://unicode-org.github.io/icu/userguide/icu/design.html#version-numbers-in-icu), combining the former first two fields into one, thus the major release sequence is ..., ICU 4.6, ICU 4.8, ICU **49**, ICU 50, ICU 51, …
|
||||
|
||||
For older ICU releases see the [Old ICU Releases](https://icu.unicode.org/download/old) page.
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
layout: default
|
||||
title: ICU Documentation
|
||||
nav_order: 100
|
||||
nav_order: 1
|
||||
description: ICU Documentation
|
||||
---
|
||||
|
||||
|
@ -23,12 +23,28 @@ This is the new home of the User Guide (since 2020 August).
|
|||
|
||||
## ICU Site
|
||||
|
||||
The official ICU Site is located at <https://icu.unicode.org>.
|
||||
The official ICU Site is located at https://icu.unicode.org/.
|
||||
It is the official landing page for the ICU project.
|
||||
|
||||
Some of the pages from the ICU Site have been migrated here.
|
||||
The migrated sections and pages from the ICU Site are visible in the navigation bar of this site below the "ICU Site" section heading.
|
||||
|
||||
## Downloading ICU
|
||||
|
||||
The [Downloading ICU](download) page has been migrated here.
|
||||
|
||||
### Latest Release
|
||||
|
||||
***2025-03-13: ICU 77 is now available*** —
|
||||
[releases/tag/release-77-1](https://github.com/unicode-org/icu/releases/tag/release-77-1) —
|
||||
[Maven: com.ibm.icu / icu4j / version 77.1](https://mvnrepository.com/artifact/com.ibm.icu/icu4j/77.1)
|
||||
|
||||
[ICU 77](download/77.md) updates to [CLDR 47](https://cldr.unicode.org/downloads/cldr-47)
|
||||
locale data with new locales, and various additions and corrections.
|
||||
|
||||
ICU 77 is mostly focused on bug fixes, segmentation conformance, and other refinements.
|
||||
The technology preview implementations of the CLDR MessageFormat 2.0 specification have been updated to incorporate some, but not yet all, of the CLDR 47 changes. (Java more than C++)
|
||||
|
||||
## ICU team member pages
|
||||
|
||||
Other documentation pages here are written by and for team members.
|
||||
|
|
|
@ -27,8 +27,8 @@ All Rights Reserved.
|
|||
# Intro and setup
|
||||
|
||||
These instructions describe how to regenerate ICU4C locale and linguistic data from CLDR,
|
||||
and then how to convert that ICU4 data for ICU4J (data jars and maven resources).
|
||||
They apply to CLDR 44 / ICU 74 and later.
|
||||
and then how to convert that ICU4C data for ICU4J (data jars and maven resources).
|
||||
They apply to CLDR 47 / ICU 77 and later.
|
||||
|
||||
To use these instructions just for generating ICU4J data from ICU4C, you only need to use
|
||||
steps 1, 8, and 12 in the Process section.
|
||||
|
@ -37,22 +37,26 @@ The full process requires local copies of
|
|||
|
||||
* CLDR (the source of most of the data, and some Java tools)
|
||||
* The complete ICU source tree, including:
|
||||
* tools: includes the LdmlConverter build tool and associated config files
|
||||
* icu4c: the target for converted CLDR data, and source for ICU4J data; includes tests for the converted data
|
||||
* icu4j: the target for updated data jars; includes tests for the converted data
|
||||
* `tools`: includes the `LdmlConverter` build tool and associated config files
|
||||
* `icu4c`: the target for converted CLDR data, and source for ICU4J data; includes tests for the converted data
|
||||
* `icu4j`: the target for updated data jars; includes tests for the converted data
|
||||
|
||||
For an official CLDR data integration into ICU, these should be clean, freshly
|
||||
checked-out. For released CLDR sources, an alternative to checking out sources
|
||||
for a given version is downloading the zipped sources for the common (core.zip)
|
||||
and tools (tools.zip) directory subtrees from the Data column in
|
||||
for a given version is downloading the zipped sources for the common (`core.zip`)
|
||||
and tools (`tools.zip`) directory subtrees from the Data column in
|
||||
[CLDR Releases/Downloads](https://cldr.unicode.org/index/downloads)
|
||||
|
||||
Besides a standard JDK, the process also requires [ant](https://ant.apache.org) and
|
||||
Besides a standard JDK 11+, the process also requires [ant](https://ant.apache.org) and
|
||||
[maven](https://maven.apache.org) plus the xml-apis.jar from the
|
||||
[Apache xalan package](https://xalan.apache.org/xalan-j/downloads.html) _(Is this
|
||||
latter requirement still true?)_. You will also need to have performed the
|
||||
latter requirement still true?)_.
|
||||
|
||||
If you do CLDR development you can configure maven as documented at
|
||||
[CLDR Maven setup](http://cldr.unicode.org/development/maven) (non-Eclipse version).
|
||||
|
||||
But for the CLDR to ICU data conversion, or for regular ICU development this is not needed.
|
||||
|
||||
Notes:
|
||||
|
||||
* Enough things can (and will) fail in this process that it is best to
|
||||
|
@ -65,12 +69,12 @@ Notes:
|
|||
files are used in addition to the CLDR files as inputs to the CLDR data build
|
||||
process for ICU):
|
||||
* The primary file to edit for adding/removing locales and/or collation and
|
||||
rbnf data is<br>
|
||||
`$TOOLS_ROOT/cldr/cldr-to-icu/build-icu-data.xml`.
|
||||
`rbnf` data is \
|
||||
`$ICU_DIR/tools/cldr/cldr-to-icu/config.xml`.
|
||||
* There are some files in `icu4c/source/data/xml/` that may need editing for
|
||||
certain additions. This is especially true for brkitr additions; however there
|
||||
are rbnf files there that add some rules. The collation files there mainly
|
||||
hook up the UCA collation rules in `icu4c/data/unidata/UCARules.txt` to the
|
||||
certain additions. This is especially true for `brkitr` additions; however there
|
||||
are `rbnf` files there that add some rules. The collation files there mainly
|
||||
hook up the UCA collation rules in `icu4c/source/data/unidata/UCARules.txt` to the
|
||||
collation data. To process these files, certain CLDR dtds are copied over to
|
||||
ICU.
|
||||
|
||||
|
@ -88,14 +92,14 @@ considerations:
|
|||
# CLDR prerequisites for BRS integrations
|
||||
|
||||
The following tasks should be done in the CLDR repo before beginning a CLDR-ICU
|
||||
integration that ss part of the BRS process; handle each of these using a separate
|
||||
integration that is part of the BRS process; handle each of these using a separate
|
||||
ticket and a separate PR:
|
||||
|
||||
1. Generate updated CLDR test data (which is copied to ICU), using the process in
|
||||
[Generating CLDR testData](https://docs.google.com/document/d/1-RC99npKcSSwUoYGkSzxaKOe76gYRkWhGdFzCdIBCu4/edit#heading=h.2rum9c6hrr4w)
|
||||
|
||||
2. Run CLDRModify with no options with no options and then with -fP. The webpage
|
||||
for CLDRModify is currently being converted to markdown, a reference to it will
|
||||
2. Run `CLDRModify` with no options with no options and then with `-fP`. The web page
|
||||
for `CLDRModify` is currently being converted to markdown, a reference to it will
|
||||
be added when that process is complete.
|
||||
|
||||
# Environment variables
|
||||
|
@ -120,61 +124,61 @@ There are several environment variables that need to be defined.
|
|||
|
||||
* `CLDR_TMP_DIR`: Parent of temporary CLDR production data. Defaults to
|
||||
`$CLDR_DIR/../cldr-aux` (sibling to `CLDR_DIR`).
|
||||
|
||||
> **NOTE:** As of CLDR 36 and 37, the GenerateProductionData tool no longer
|
||||
|
||||
> **NOTE:** As of CLDR 36 and 37, the `GenerateProductionData` tool no longer
|
||||
generates data by default into `$CLDR_TMP_DIR/production`; instead it
|
||||
generates data into `$CLDR_DIR/../cldr-staging/production` (though there is
|
||||
a command-line option to override this). However the rest of the build still
|
||||
assumes that the generated data is in `$CLDR_TMP_DIR/production`.
|
||||
So `CLDR_TMP_DIR` must be defined to be `CLDR_DIR/../cldr-staging`.
|
||||
|
||||
|
||||
3. ICU-related variables
|
||||
|
||||
* `ICU4C_DIR`: Path to root of ICU4C sources, below which is the source dir.
|
||||
* `ICU_DIR`: Path to root of ICU directory, below which are (e.g.) the
|
||||
`icu4c`, `icu4j`, and `tools` directories.
|
||||
|
||||
* `ICU4J_ROOT`: Path to root of ICU4J sources, below which is the main dir.
|
||||
* `ICU4C_DIR`: Path to root of ICU4C sources, below which is the `source` dir.
|
||||
|
||||
* `ICU4J_ROOT`: Path to root of ICU4J sources, below which is the `main` dir.
|
||||
|
||||
* `TOOLS_ROOT`: Path to root of ICU tools directory, below which are (e.g.) the
|
||||
cldr and unicodetools dirs.
|
||||
|
||||
# Process
|
||||
|
||||
|
||||
## 1 Environment variables
|
||||
|
||||
1a. Java, ant, and maven variables, adjust for your system
|
||||
```
|
||||
```sh
|
||||
export JAVA_HOME=/usr/libexec/java_home
|
||||
export ANT_OPTS="-Xmx8192m"
|
||||
export MAVEN_ARGS="--no-transfer-progress"
|
||||
```
|
||||
|
||||
1b. CLDR variables, adjust for your setup; with cygwin it might be e.g.
|
||||
```
|
||||
```sh
|
||||
CLDR_DIR=`cygpath -wp /build/cldr`
|
||||
```
|
||||
|
||||
Note that for cldr-staging we do not use personal forks, we commit directly.
|
||||
```
|
||||
```sh
|
||||
export CLDR_DIR=$HOME/cldr-myfork
|
||||
export CLDR_TMP_DIR=$HOME/cldr-staging
|
||||
export CLDR_DATA_DIR=$HOME/cldr-staging/production
|
||||
```
|
||||
|
||||
1c. ICU variables
|
||||
```
|
||||
```sh
|
||||
export ICU4C_DIR=$HOME/icu-myfork/icu4c
|
||||
export ICU4J_ROOT=$HOME/icu-myfork/icu4j
|
||||
export TOOLS_ROOT=$HOME/icu-myfork/tools
|
||||
```
|
||||
|
||||
1d. Directory for logs/notes (create if does not exist)
|
||||
```
|
||||
```sh
|
||||
export NOTES=...(some directory)...
|
||||
mkdir -p $NOTES
|
||||
```
|
||||
|
||||
1e. The name of the icu data directory for Java (for example `icudt74b`)
|
||||
```
|
||||
```sh
|
||||
export ICU_DATA_VER=icudt(version)b
|
||||
```
|
||||
|
||||
|
@ -182,10 +186,10 @@ export ICU_DATA_VER=icudt(version)b
|
|||
|
||||
2a. Configure ICU4C, build and test without new data first, to verify that
|
||||
there are no pre-existing errors, and to build some tools needed for later
|
||||
steps. Here `<platform>` is the runConfigureICU code for the platform you
|
||||
steps. Here `<platform>` is the `runConfigureICU` code for the platform you
|
||||
are building on, e.g. Linux, macOS, Cygwin.
|
||||
(optionally build with debug enabled)
|
||||
```
|
||||
```sh
|
||||
cd $ICU4C_DIR/source
|
||||
./runConfigureICU [--enable-debug] <platform>
|
||||
make clean
|
||||
|
@ -195,7 +199,7 @@ make check 2>&1 | tee $NOTES/icu4c-oldData-makeCheck.txt
|
|||
2b. Now with ICU4J, build and test without new data first, to verify that
|
||||
there are no pre-existing errors (or at least to have the pre-existing errors
|
||||
as a base for comparison):
|
||||
```
|
||||
```sh
|
||||
cd $ICU4J_ROOT
|
||||
mvn clean
|
||||
mvn verify 2>&1 | tee $NOTES/icu4j-oldData-mvnCheck.txt
|
||||
|
@ -210,31 +214,33 @@ cp -p $CLDR_DIR/common/dtd/ldmlICU.dtd $ICU4C_DIR/source/data/dtd/cldr/common/dt
|
|||
```
|
||||
|
||||
3b. Update the cldr-icu tooling to use the latest tagged version of ICU
|
||||
```
|
||||
open $TOOLS_ROOT/cldr/cldr-to-icu/pom.xml
|
||||
```sh
|
||||
open $ICU_DIR/tools/cldr/cldr-to-icu/pom.xml
|
||||
```
|
||||
(search for `icu4j-for-cldr` and update to the latest tagged version per instructions)
|
||||
|
||||
3c. Update the build for any new icu version, added locales, etc.
|
||||
```sh
|
||||
# ICU version
|
||||
open $ICU_DIR/tools/cldr/cldr-to-icu/pom.xml
|
||||
# Locales and other configuration changes
|
||||
open $ICU_DIR/tools/cldr/cldr-to-icu/config.xml
|
||||
```
|
||||
open $TOOLS_ROOT/cldr/cldr-to-icu/build-icu-data.xml
|
||||
```
|
||||
(update icuVersion, icuDataVersion if necessary; update lists of locales to include if necessary)
|
||||
(update `icuVersion`, `icuDataVersion` if necessary; update lists of locales to include if necessary)
|
||||
|
||||
3d. If there are new data types or variants in CLDR, you may need to update the
|
||||
files that specify mapping of CLDR data to ICU rseources:
|
||||
```
|
||||
open $TOOLS_ROOT/cldr/cldr-to-icu/src/main/resources/ldml2icu_locale.txt
|
||||
open $TOOLS_ROOT/cldr/cldr-to-icu/src/main/resources/ldml2icu_supplemental.txt
|
||||
files that specify mapping of CLDR data to ICU resources:
|
||||
```sh
|
||||
open $ICU_DIR/tools/cldr/cldr-to-icu/src/main/resources/ldml2icu_locale.txt
|
||||
open $ICU_DIR/tools/cldr/cldr-to-icu/src/main/resources/ldml2icu_supplemental.txt
|
||||
```
|
||||
|
||||
## 4 Build and install CLDR jar
|
||||
|
||||
See `$TOOLS_ROOT/cldr/lib/README.txt` for more information on the CLDR
|
||||
jar and the `install-cldr-jars.sh` script.
|
||||
```
|
||||
cd $TOOLS_ROOT/cldr
|
||||
ant install-cldr-libs
|
||||
See `$ICU_DIR/tools/cldr/cldr-to-icu/README.md` for more information on the CLDR jar.
|
||||
```sh
|
||||
cd "$CLDR_DIR"
|
||||
mvn clean install -pl :cldr-all,:cldr-code -DskipTests -DskipITs
|
||||
```
|
||||
|
||||
## 5 Generate CLDR production data and convert for ICU
|
||||
|
@ -247,14 +253,15 @@ This process uses ant with ICU4C's `data/build.xml`
|
|||
(usually `$CLDR_TMP_DIR/production`), required if any CLDR data has changed.
|
||||
* Running `ant setup` is not required, but it will print useful errors to
|
||||
debug issues with your path when it fails.
|
||||
```
|
||||
|
||||
```sh
|
||||
cd $ICU4C_DIR/source/data
|
||||
ant cleanprod
|
||||
ant setup
|
||||
ant proddata 2>&1 | tee $NOTES/cldr-newData-proddataLog.txt
|
||||
```
|
||||
|
||||
> Note, for CLDR development, at this point tests are sometimes run on the
|
||||
> Note, for CLDR development, at this point tests are sometimes run on the
|
||||
production data, see
|
||||
[BRS: Run tests on production data](https://cldr.unicode.org/development/cldr-big-red-switch/brs-run-tests-on-production-data)
|
||||
|
||||
|
@ -262,26 +269,27 @@ ant proddata 2>&1 | tee $NOTES/cldr-newData-proddataLog.txt
|
|||
|
||||
These include .txt files and .py files. These new files will replace whatever was
|
||||
already present in the ICU4C sources. This process uses the `LdmlConverter` in
|
||||
`$TOOLS_ROOT/cldr/cldr-to-icu/`; see `$TOOLS_ROOT/cldr/cldr-to-icu/README.txt`.
|
||||
`$ICU_DIR/tools/cldr/cldr-to-icu/`; see `$ICU_DIR/tools/cldr/cldr-to-icu/README.md`.
|
||||
|
||||
* This process will take several minutes, during most of which there will be no log
|
||||
output (so do not assume nothing is happening). Keep a log so you can investigate
|
||||
anything that looks suspicious.
|
||||
* Note that `ant clean` should _not_ be run before this. The `build-icu-data.xml` process
|
||||
* The conversion tool
|
||||
will automatically run its own "clean" step to delete files it cannot determine to
|
||||
be ones that it would generate, except for pasts listed in `<retain>` elements such as
|
||||
`coll/de__PHONEBOOK.txt`, `coll/de_.txt`, etc.
|
||||
* Before running ant to regenerate the data, make any necessary changes to the
|
||||
build-icu-data.xml file, such as adding new locales etc.
|
||||
```
|
||||
cd $TOOLS_ROOT/cldr/cldr-to-icu
|
||||
ant -f build-icu-data.xml -DcldrDataDir="$CLDR_TMP_DIR/production" | tee $NOTES/cldr-newData-builddataLog.txt
|
||||
* Before running the tool to regenerate the data, make any necessary changes to the
|
||||
`config.xml` file, such as adding new locales etc.
|
||||
|
||||
```sh
|
||||
cd $ICU_DIR/tools/cldr/cldr-to-icu
|
||||
java -jar target/cldr-to-icu-1.0-SNAPSHOT-jar-with-dependencies.jar --cldrDataDir="$CLDR_TMP_DIR/production" | tee $NOTES/cldr-newData-builddataLog.txt
|
||||
```
|
||||
|
||||
5c. Update the CLDR testData files needed by ICU4C/J tests, ensuring
|
||||
they are representative of the newest CLDR data.
|
||||
```
|
||||
cd $TOOLS_ROOT/cldr
|
||||
```sh
|
||||
cd $ICU_DIR/tools/cldr
|
||||
ant copy-cldr-testdata
|
||||
```
|
||||
|
||||
|
@ -289,7 +297,7 @@ ant copy-cldr-testdata
|
|||
(This step has been subsumed into 5c above)
|
||||
|
||||
5e. For now, manually re-add the `lstm` entries in `data/brkitr/root.txt`
|
||||
```
|
||||
```sh
|
||||
open $ICU4C_DIR/source/data/brkitr/root.txt
|
||||
```
|
||||
Paste the following block after the dictionaries block and before the final closing '}':
|
||||
|
@ -302,20 +310,20 @@ Paste the following block after the dictionaries block and before the final clos
|
|||
|
||||
5f. Update hard-coded lists in ICU
|
||||
|
||||
ICU4 has some hard-coded lists of locale-related codes that may need updating. Ideally these should
|
||||
ICU has some hard-coded lists of locale-related codes that may need updating. Ideally these should
|
||||
be replaced by data converted from CLDR ([ICU-22839](https://unicode-org.atlassian.net/browse/ICU-22839)). In the
|
||||
meantime these need to be updated manually.
|
||||
|
||||
| code type | icu4c/source library file(s) | icu4c/source test file(s) |
|
||||
| -------------------------------------------------------------------------------------------- | ------------------------------------------- | ------------------------------------------- |
|
||||
| language<BR>(at least all language codes in ICU locales or CLDR attributeValueValidity.xml) | common/uloc.cpp: LANGUAGES[], LANGUAGES_3[] | test/testdata/structLocale.txt: Languages |
|
||||
| region<BR>(at least all region codes in ICU locales or CLDR attributeValueValidity.xml) | common/uloc.cpp: COUNTRIES[], COUNTRIES_3[] | test/testdata/structLocale.txt: Countries |
|
||||
| currency (see note below)<BR>(at least everything in CLDR supplementalData.xml currencyData) | common/ucurr.cpp: gCurrencyList[]] | test/testdata/structLocale.txt: Currencies,CurrencyPlurals<BR>test/cintltst/currtest.c:TestEnumList() |
|
||||
| timezone | (not currently aware of hard-coded list) | test/testdata/structLocale.txt: zoneStrings |
|
||||
| language<BR>(at least all language codes in ICU locales or CLDR `attributeValueValidity.xml`) | `common/uloc.cpp`: `LANGUAGES[], LANGUAGES_3[]` | `test/testdata/structLocale.txt`: Languages |
|
||||
| region<BR>(at least all region codes in ICU locales or CLDR `attributeValueValidity.xml`) | `common/uloc.cpp`: `COUNTRIES[], COUNTRIES_3[]` | `test/testdata/structLocale.txt`: Countries |
|
||||
| currency (see note below)<BR>(at least everything in CLDR `supplementalData.xml` `currencyData`) | `common/ucurr.cpp`: `gCurrencyList[]]` | `test/testdata/structLocale.txt`: `Currencies`,`CurrencyPlurals`<BR>`test/cintltst/currtest.c`:`TestEnumList()` |
|
||||
| timezone | (not currently aware of hard-coded list) | `test/testdata/structLocale.txt`: `zoneStrings` |
|
||||
|
||||
Note: currency code lists are also in other code lists along with measurement units,
|
||||
but these are re-generated using the procedure in
|
||||
[Updating MeasureUnit with new CLDR data](https://unicode-org.github.io/icu/processes/release/tasks/updating-measure-unit.html)
|
||||
[Updating `MeasureUnit` with new CLDR data](https://unicode-org.github.io/icu/processes/release/tasks/updating-measure-unit.html)
|
||||
(also mentioned in step 14 below).
|
||||
|
||||
## 6 Check the results
|
||||
|
@ -323,7 +331,7 @@ but these are re-generated using the procedure in
|
|||
Check which data files have modifications, which have been added or removed
|
||||
(if there are no changes, you may not need to proceed further). Make sure the
|
||||
list seems reasonable. You may want to save logs, and possibly examine them...
|
||||
```
|
||||
```sh
|
||||
cd $ICU4C_DIR/..
|
||||
git status
|
||||
git status > $NOTES/gitStatusDelta-data.txt
|
||||
|
@ -332,7 +340,7 @@ open $NOTES/gitDiffDelta-data.txt
|
|||
```
|
||||
|
||||
6a. You may also want to check which files were modified in CLDR production data:
|
||||
```
|
||||
```sh
|
||||
cd $CLDR_TMP_DIR
|
||||
git status
|
||||
git status > $NOTES/gitStatusDelta-staging.txt
|
||||
|
@ -342,25 +350,25 @@ git diff > $NOTES/gitDiffDelta-staging.txt
|
|||
## 7 Fix data generation errors
|
||||
|
||||
Look for evident errors in the list of file changes, or in the file diffs.
|
||||
Fixing them may entail modifying CLDR source data or `TOOLS_ROOT` config files or
|
||||
Fixing them may entail modifying CLDR source data or `$ICU_DIR/tools/cldr/cldr-to-icu` config files or
|
||||
tooling.
|
||||
|
||||
## 8 Rebuild ICU4C with new data, run tests
|
||||
|
||||
8a. Re-run configure and make clean, necessary to handle any files added or deleted:
|
||||
```
|
||||
```sh
|
||||
cd $ICU4C_DIR/source
|
||||
./runConfigureICU [--enable-debug] <platform>
|
||||
make clean
|
||||
```
|
||||
|
||||
8b. Do the rebuild, keeping a log as before:
|
||||
```
|
||||
```sh
|
||||
make check 2>&1 | tee $NOTES/icu4c-newData-makeCheck.txt
|
||||
```
|
||||
|
||||
To re-run a specific test if necessary when fixing bugs; for example:
|
||||
```
|
||||
```sh
|
||||
cd test/intltest
|
||||
DYLD_LIBRARY_PATH=../../lib:../../stubdata:../../tools/ctestfw:$DYLD_LIBRARY_PATH ./intltest -e -G format/NumberTest/NumberPermutationTest
|
||||
cd ../..
|
||||
|
@ -380,7 +388,8 @@ ticket under which you are performing the integration, if you have one), fix the
|
|||
and regenerate from step 4.
|
||||
|
||||
If the data is OK , other sources of failure can include:
|
||||
* Problems with the CLDR-ICU conversion process (pehaps some locale data is not getting
|
||||
|
||||
* Problems with the CLDR-ICU conversion process (perhaps some locale data is not getting
|
||||
converted properly; go back to step 3, adjust and repeat from there.
|
||||
* Problems with ICU library code that may not be using new resources properly. Fix and
|
||||
repeat from step 8.
|
||||
|
@ -390,9 +399,9 @@ If the data is OK , other sources of failure can include:
|
|||
you will need to update `icu4c/test/testdata/structLocale.txt` (otherwise
|
||||
`/tsutil/cldrtest/TestLocaleStructure` may fail).
|
||||
|
||||
## 10 Running ICU4C tests in exhaustive mode.
|
||||
## 10 Running ICU4C tests in exhaustive mode
|
||||
|
||||
Exhautive tests should always be run for a CLDR-ICU integration PR before it is merged.
|
||||
Exhaustive tests should always be run for a CLDR-ICU integration PR before it is merged.
|
||||
Once you have a PR, you can do this for both C and J as part of the pre-merge CI tests
|
||||
by manually running a workflow (the exhaustive tests are not run automatically on every PR).
|
||||
See [Continuous Integration / Exhaustive Tests](../userguide/dev/ci.md#exhaustive-tests).
|
||||
|
@ -400,7 +409,7 @@ See [Continuous Integration / Exhaustive Tests](../userguide/dev/ci.md#exhaustiv
|
|||
The following instructions run the ICU4C exhaustive tests locally (which you may want to do
|
||||
before even committing changes, or which may be necessary to diagnose failures in the
|
||||
CI tests):
|
||||
```
|
||||
```sh
|
||||
cd $ICU4C_DIR/source
|
||||
export INTLTEST_OPTS="-e"
|
||||
export CINTLTST_OPTS="-e"
|
||||
|
@ -415,13 +424,13 @@ appropriate, and repeating from step 4 or 8 as appropriate.
|
|||
## 12 Transfer the ICU4C data to ICU4J
|
||||
|
||||
12a. You need to reconfigure ICU4C to include the unicore data.
|
||||
```
|
||||
```sh
|
||||
cd $ICU4C_DIR/source
|
||||
ICU_DATA_BUILDTOOL_OPTS=--include_uni_core_data ./runConfigureICU <platform>
|
||||
```
|
||||
|
||||
12b. Rebuild the data with the new config setting, then create the ICU4J data jar.
|
||||
```
|
||||
```sh
|
||||
cd $ICU4C_DIR/source/data
|
||||
make clean
|
||||
make -j -l2.5
|
||||
|
@ -429,13 +438,13 @@ make icu4j-data-install
|
|||
```
|
||||
|
||||
12c. Create the test data jar
|
||||
```
|
||||
```sh
|
||||
cd $ICU4C_DIR/source/test/testdata
|
||||
make icu4j-data-install
|
||||
```
|
||||
|
||||
12d. Update the extracted {main, test} data files in the Maven build
|
||||
```
|
||||
```sh
|
||||
cd $ICU4J_ROOT
|
||||
./extract-data-files.sh
|
||||
```
|
||||
|
@ -443,7 +452,7 @@ cd $ICU4J_ROOT
|
|||
## 13 Rebuild ICU4J with new data, run tests
|
||||
|
||||
13a. Run the tests using the maven build
|
||||
```
|
||||
```sh
|
||||
cd $ICU4J_ROOT
|
||||
mvn clean
|
||||
mvn install 2>&1 | tee $NOTES/icu4j-newData-mvnCheck.txt
|
||||
|
@ -451,26 +460,29 @@ mvn install 2>&1 | tee $NOTES/icu4j-newData-mvnCheck.txt
|
|||
|
||||
It is possible to re-run a specific test class or method if necessary when fixing bugs.
|
||||
|
||||
For example (using artifactId, full class name, test all methods):
|
||||
```
|
||||
For example (using `artifactId`, full class name, test all methods):
|
||||
```sh
|
||||
mvn install -pl :core -Dtest=com.ibm.icu.dev.test.util.LocaleBuilderTest
|
||||
```
|
||||
or (example of using module path, class name, one method):
|
||||
```
|
||||
```sh
|
||||
mvn install -pl main/common_tests -Dtest=MeasureUnitTest#TestGreek
|
||||
```
|
||||
|
||||
13b. Optionally run the tests in exhautive mode
|
||||
13b. Optionally run the tests in exhaustive mode
|
||||
|
||||
Optionally run before committing changes, or run to diagnose failures from
|
||||
running exhastive CI tests in the PR using `/azp run CI-Exhaustive`:
|
||||
```
|
||||
Optionally run exhaustive tests locally before committing changes:
|
||||
```sh
|
||||
cd $ICU4J_ROOT
|
||||
mvn install -DICU.exhaustive=10 2>&1 | tee $NOTES/icu4j-newData-mvnCheckEx.txt
|
||||
```
|
||||
|
||||
Exhaustive tests in CI can be triggered by running the "Exhaustive Tests for ICU"
|
||||
action from the GitHub web UI.
|
||||
See [Continuous Integration / Exhaustive Tests](../userguide/dev/ci.md#exhaustive-tests).
|
||||
|
||||
Running a specific test is the same as above:
|
||||
```
|
||||
```sh
|
||||
mvn install --pl :core -DICU.exhaustive=10 -Dtest=ExhaustiveNumberTest
|
||||
```
|
||||
|
||||
|
@ -482,7 +494,7 @@ step 4, as appropriate, until there are no more failures in ICU4C or ICU4J.
|
|||
Note that certain data changes and related test failures may require the
|
||||
rebuilding of other kinds of data and/or code. For example:
|
||||
|
||||
### Updating MeasureUnit code and tests
|
||||
### Updating `MeasureUnit` code and tests
|
||||
|
||||
If you see a failure such as
|
||||
```
|
||||
|
@ -490,7 +502,7 @@ MeasureUnitTest testCLDRUnitAvailability Failure (MeasureUnitTest.java:3410) : U
|
|||
```
|
||||
then you will need to update the C and J library and test code for new measurement
|
||||
units, see the procedure at
|
||||
[Updating MeasureUnit with new CLDR data](https://unicode-org.github.io/icu/processes/release/tasks/updating-measure-unit.html)
|
||||
[Updating `MeasureUnit` with new CLDR data](https://unicode-org.github.io/icu/processes/release/tasks/updating-measure-unit.html)
|
||||
|
||||
### Updating plurals test data
|
||||
|
||||
|
@ -503,12 +515,12 @@ To address these requires updating the LOCALE_SNAPSHOT data in
|
|||
```
|
||||
$ICU4J_ROOT/main/common_tests/src/test/java/com/ibm/icu/dev/test/format/PluralRulesTest.java
|
||||
```
|
||||
by modifying the TestLocales() test there to run `generateLOCALE_SNAPSHOT()` and
|
||||
by modifying the `TestLocales()` test there to run `generateLOCALE_SNAPSHOT()` and
|
||||
then copying in the updated data.
|
||||
|
||||
## 15 Check the ICU file changes and commit
|
||||
|
||||
```
|
||||
```sh
|
||||
cd $ICU4C_DIR/source
|
||||
make clean
|
||||
cd $ICU4J_ROOT
|
||||
|
@ -528,13 +540,13 @@ git push origin ICU-nnnnn-branchname
|
|||
(Only for an official integration from CLDR git repositories)
|
||||
|
||||
16a. Check cldr-staging changes, and commit
|
||||
```
|
||||
```sh
|
||||
cd $CLDR_TMP_DIR
|
||||
git status
|
||||
```
|
||||
|
||||
Then `git add` or `git rm` files as necessary. Record the changes, commit and push.
|
||||
```
|
||||
```sh
|
||||
git status > $NOTES/gitStatusDelta-production-afterAdd.txt
|
||||
git commit -m 'CLDR-nnnnn production data corresponding to CLDR release-nn-stage'
|
||||
git push origin main
|
||||
|
@ -545,8 +557,8 @@ git push origin main
|
|||
|
||||
(There may be other cldr-staging changes unrelated to production data, such as charts
|
||||
or spec; we want to include them in the tag, so pull first, but log to see what the
|
||||
chnages are first)
|
||||
```
|
||||
changes are first)
|
||||
```sh
|
||||
cd $CLDR_TMP_DIR
|
||||
git pull
|
||||
git log
|
||||
|
@ -559,7 +571,7 @@ git push --tags
|
|||
|
||||
We need to tag the main cldr repository. If $CLDR_DIR represents that repository,
|
||||
this is easy:
|
||||
```
|
||||
```sh
|
||||
cd $CLDR_DIR
|
||||
git tag -a "release-nn-stage" -m "CLDR-nnnnn: tag CLDR release-nn-stage"
|
||||
git push --tags
|
||||
|
@ -567,7 +579,7 @@ git push --tags
|
|||
|
||||
However if $CLDR_DIR represents your personal fork or a branch from it, you need to
|
||||
figure out what commit hash yo have integrated, and tag that hash in the main repo.
|
||||
```
|
||||
```sh
|
||||
cd $CLDR_DIR
|
||||
git log
|
||||
```
|
||||
|
@ -575,7 +587,7 @@ Note the latest commit hash hhhhhhhh...
|
|||
|
||||
Then switch to the main repo, update it, and tag the appropriate hash (making sure
|
||||
it is in that repo!):
|
||||
```
|
||||
```sh
|
||||
cd $HOME/cldr
|
||||
git pull
|
||||
git log
|
||||
|
@ -583,7 +595,7 @@ git tag -a "release-nn-stage" -m "CLDR-nnnnn: tag CLDR release-nn-stage" hhhhhhh
|
|||
git push --tags
|
||||
```
|
||||
|
||||
## 18 Pubish the cldr tags in github
|
||||
## 18 Publish the cldr tags in github
|
||||
|
||||
You should publish the cldr and cldr-staging tags in github.
|
||||
|
||||
|
|
|
@ -59,6 +59,10 @@ Also, please look out for this type of message: "\***\*\* WARNING Bad namespace
|
|||
not defined inside the "icu" namespace. Consider adding **U_NAMESPACE_BEGIN**
|
||||
and **U_NAMESPACE_END** around the class and member definitions.
|
||||
|
||||
## Update the runners
|
||||
|
||||
In all workflow yaml files, update macos-n, ubuntu-p.q, windows-yyyy to the version currently designated -latest on https://github.com/actions/runner-images?tab=readme-ov-file#available-images.
|
||||
|
||||
## Update the pool bundles
|
||||
|
||||
*Obsolete for ICU 64+*: The pool bundles are no longer checked in. Instead,
|
||||
|
|
|
@ -368,9 +368,6 @@ Note: This is also referenced below [Upload API documentations](docs.md#upload-a
|
|||
|
||||
### ICU4J
|
||||
|
||||
**Note:** JCite must be installed for building ICU4J documentation:
|
||||
<https://icu.unicode.org/setup/java/ant#TOC-Building-ICU4J-API-Reference-Document-with-JCite>
|
||||
|
||||
Build the API documentation pages for the new release:
|
||||
|
||||
```
|
||||
|
|
|
@ -126,6 +126,37 @@ the UTF-8 signature byte sequence ("BOM").~~
|
|||
|
||||
## Clean up import statements
|
||||
|
||||
### From command line
|
||||
|
||||
This can be done from command line using the
|
||||
[Google Java Format](https://github.com/google/google-java-format) tool.
|
||||
|
||||
**WARNING:** requires JDK 17 or newer (December 2024)
|
||||
|
||||
Download the latest Google Java Format from Maven Central:
|
||||
```sh
|
||||
mvn dependency:copy -Dartifact=com.google.googlejavaformat:google-java-format:LATEST:jar:all-deps \
|
||||
-DoutputDirectory=/tmp \
|
||||
-Dmdep.stripVersion=true \
|
||||
-q -ntp
|
||||
```
|
||||
|
||||
Cleanup all Java files (only imports, nothing else):
|
||||
```sh
|
||||
find . -type f -name '*.java' | xargs java -jar /tmp/google-java-format-all-deps.jar -i --aosp --fix-imports-only --skip-sorting-imports
|
||||
```
|
||||
|
||||
Remove the Google Java Format artifact from the temporary folder:
|
||||
```sh
|
||||
rm /tmp/google-java-format-all-deps.jar
|
||||
```
|
||||
|
||||
You can (of course) download it from
|
||||
[GitHub Releases](https://github.com/google/google-java-format/releases). \
|
||||
Or save it in a personal tools folder and keep it around.
|
||||
|
||||
### From Eclipse
|
||||
|
||||
The Eclipse IDE provides a feature which allow you to organize import statements
|
||||
for multiple files. Right click on projects/source folders/files, you can select
|
||||
\[Source\] - \[Organize Imports\] which resolve all wildcard imports and sort
|
||||
|
|
|
@ -57,13 +57,34 @@ merging post RC fixes from trunk and others.
|
|||
Every commit being shipped in the next ICU release should be labeled with a Jira
|
||||
ticket that is marked as fixed with the correct fix version. Further, there
|
||||
should be no Jira tickets marked as fixed with the current fixVersion that do
|
||||
not have commits. To check this, run the following tool:
|
||||
not have commits.
|
||||
|
||||
### Run locally
|
||||
|
||||
To check this, run the following tool:
|
||||
|
||||
<https://github.com/unicode-org/icu/tree/main/tools/commit-checker>
|
||||
|
||||
Follow the instructions in the README file to generate the report and send it
|
||||
Follow the instructions in the README file to generate the report locally and send it
|
||||
for review.
|
||||
|
||||
### Run via CI
|
||||
|
||||
Alternatively, you can run the "BRS Commit Checker Report" workflow directly from the project page CI
|
||||
by:
|
||||
|
||||
1. Go to the [Actions tab](https://github.com/unicode-org/icu/actions)
|
||||
1. Click on the "BRS Commit Checker Report" workflow name on the left hand list of workflows
|
||||
1. Click the "Run workflow" dropdown.
|
||||
|
||||
The dropdown should reveal an input form in which to provide inputs
|
||||
|
||||
1. Provide the same inputs in the form as you would for a local run of the tool,
|
||||
as described in the tool's Readme in the instructions above.
|
||||
|
||||
The only difference from the local run instructions is that git branch names in the
|
||||
Actions workflow input form should be prefixed with `origin/`.
|
||||
|
||||
---
|
||||
|
||||
## Fix Mis-ticketted commits
|
||||
|
|
|
@ -165,28 +165,19 @@ trunk at the source revision is good.~~
|
|||
Create the download page before the first milestone, if we have one, or before
|
||||
the release candidate.
|
||||
|
||||
Log into the ICU homepage Google Site. (If you don't have write access, ask one
|
||||
of the editors to grant you access.)
|
||||
Since ICU 76, new download pages are in Markdown on GitHub, at docs/download/ .
|
||||
|
||||
Verify that there is not already a page for the upcoming release: Either via the
|
||||
sitemap, or on the bottom of the main download page where it says something like
|
||||
"Subpages (27): View All".
|
||||
In your ICU workspace, copy the download page for the last release.
|
||||
Adjust the navbar data at the top: Title, and nav_order one fewer than last time.
|
||||
|
||||
Copy the download page for the last release: Go to that page, gear menu, Copy
|
||||
page; "Name your page" using just the major version number for now (e.g., "61")
|
||||
so that the page URL is just that number, select "Put page under Downloading
|
||||
ICU", click the red COPY button.
|
||||
Adjust the new page as needed: Adjust the title to "ICU 77" (with the right version number...),
|
||||
remove contents specific to the previous release, update all version numbers, update all links.
|
||||
|
||||
Adjust the new page as needed: Change the title to "Download ICU 61 Release
|
||||
Candidate" (with the right version number...), remove contents specific to the
|
||||
previous release, update all version numbers, update all links.
|
||||
Put a big, **bold+italics** warning at the top like "This version has not been
|
||||
released yet. Use it for testing but do not use it in production!"
|
||||
|
||||
Put a big, bold+italics, red warning at the top like "This version has not been
|
||||
released yet. Use it for testing but not in production!"
|
||||
|
||||
Save the page. It is generally a good idea to save frequently. For further
|
||||
edits, simply go back into edit mode. (Keyboard shortcut 'e' for edit, ctrl+s
|
||||
for save.)
|
||||
Compare with the one-year-ago release page and adjust for whether we have a major release,
|
||||
a new Unicode version, etc.
|
||||
|
||||
Add new contents for the upcoming release: Grab some text from the sibling
|
||||
Unicode and CLDR release notes, look at the proposal status doc for this
|
||||
|
@ -198,9 +189,7 @@ like a Migration Issues section etc.
|
|||
|
||||
Ask everyone on the team to add stuff & details.
|
||||
|
||||
**Once the page has been created and various people are invited to edit it,
|
||||
everyone should keep editing short so that the page is not locked for others for
|
||||
long periods of time.**
|
||||
Once the page has been created and merged, consider editing online on GitHub.
|
||||
|
||||
### Maintenance release
|
||||
|
||||
|
|
|
@ -36,7 +36,6 @@ compiled with Java system libraries from JRE 7.*</span>
|
|||
* Java Runtime Environment 7 (used as bootclasspath for cross-compilation)
|
||||
* Apache Ant 1.10.x (the latest available version)
|
||||
\[<http://ant.apache.org/>\]
|
||||
* JCite 1.13.0 \[<https://arrenbrecht.ch/jcite/>\]
|
||||
|
||||
### Other Prerequisites only for GA
|
||||
|
||||
|
@ -56,9 +55,6 @@ compiled with Java system libraries from JRE 7.*</span>
|
|||
### Configuration
|
||||
|
||||
* Set environment variable `JAVA_HOME` to point to the JDK directory.
|
||||
* Set environment variable `JCITE_DIR` to specify JCite binary location (see[
|
||||
Building ICU4J API Reference Document with
|
||||
JCite](../../../setup/java/ant/index.md))
|
||||
* See `build.properties` to check version strings are properly set.
|
||||
* `api.report.version` / `api.report.prev.version` are used for locating
|
||||
API signature files and should be integer numbers.
|
||||
|
@ -150,7 +146,6 @@ compiled with Java system libraries from JRE 7.*</span>
|
|||
[echo] [WARNING] Insufficient Build Configuration for ICU4J Release
|
||||
[echo] JDK Tools Version: 1.8.0_152
|
||||
[echo] JRE 7 System Library Path: Not Defined!
|
||||
[echo] JCite Library Path: /home/yoshito/java-libs/jcite-1.13.0/build/jcite.jar:/home/yoshito/java-libs/jcite-1.13.0/lib/commons-discovery-0.4.jar:/home/yoshito/java-libs/jcite-1.13.0/lib/commons-logging-1.1.jar:/home/yoshito/java-libs/jcite-1.13.0/lib/java2html.jar`
|
||||
[echo] ################################################################
|
||||
|
||||
BUILD SUCCESSFUL
|
||||
|
|
150
docs/processes/release/tasks/updating-measure-unit-old.md
Normal file
150
docs/processes/release/tasks/updating-measure-unit-old.md
Normal file
|
@ -0,0 +1,150 @@
|
|||
---
|
||||
layout: default
|
||||
title: Updating MeasureUnit with new CLDR data
|
||||
parent: Release & Milestone Tasks
|
||||
grand_parent: Contributors
|
||||
nav_order: 120
|
||||
---
|
||||
|
||||
<!--
|
||||
© 2020 and later: Unicode, Inc. and others.
|
||||
License & terms of use: http://www.unicode.org/copyright.html
|
||||
-->
|
||||
|
||||
# Updating MeasureUnit with new CLDR data
|
||||
{: .no_toc }
|
||||
|
||||
## Contents
|
||||
{: .no_toc .text-delta }
|
||||
|
||||
1. TOC
|
||||
{:toc}
|
||||
|
||||
---
|
||||
|
||||
This document explains how to update the C++ and Java version of the MeasureUnit
|
||||
class with new CLDR data.
|
||||
|
||||
Code is generated by running MeasureUnitTest.java unit tests, which writes
|
||||
generated code to System.out. Two ways to access this:
|
||||
|
||||
1. Within **eclipse**:
|
||||
- Open MeasureUnitTest.java, run it by clicking on the green play button on
|
||||
menu bar.
|
||||
- Copy the generated code from the eclipse console to the clipboard.
|
||||
|
||||
2. With **ant**:
|
||||
- Run: `ant checkTest
|
||||
-Dtestclass='com.ibm.icu.dev.test.format.MeasureUnitTest'`
|
||||
- Open the checkTest output: `out/junit-results/checkTest/html/index.html`
|
||||
- Navigate to "System.out" at the bottom of the MeasureUnitTest page to find
|
||||
the generated code, and copy to the clipboard.
|
||||
|
||||
After syncing CLDR data with ICU do the following. This documentation assumes
|
||||
that you are updating the MeasureUnit clases for ICU 68.
|
||||
|
||||
* Check out
|
||||
$GIT_ROOT/icu4j/main/common_tests/src/test/java/com/ibm/icu/dev/test/format/MeasureUnitTest.java
|
||||
* Open MeasureUnitTest.java.
|
||||
* Find the `testZZZ` test, its code should all be commented out. This test will
|
||||
execute last and will run the desired code.
|
||||
|
||||
Make sure DRAFT_VERSIONS at top of MeasureUnitTest.java is set correctly.
|
||||
These are the ICU versions that have draft methods.
|
||||
|
||||
## Update MeasureUnit.java
|
||||
|
||||
* Change `testZZZ` to run `generateConstants(“68”); // ICU 68.`
|
||||
* Run MeasureUnitTest.java, copy the generated code (see instructions above).
|
||||
* Open MeasureUnit.java:
|
||||
$GIT_ROOT/icu4j/main/core/src/main/java/com/ibm/icu/util/MeasureUnit.java
|
||||
* Look for line containing:
|
||||
|
||||
`// Start generated MeasureUnit constants`
|
||||
* Look for line containing:
|
||||
|
||||
`// End generated MeasureUnit constants`
|
||||
* Replace all the generated code in between with the contents of the clipboard
|
||||
* Run the MeasureUnitTest.java to ensure that the new code is backward
|
||||
compatible. These compatibility tests are called something like
|
||||
`TestCompatible65`, which tests backward compatibility with ICU 65.
|
||||
* Create a compatibility test for ICU 68. Change `testZZZ` to run
|
||||
`generateBackwardCompatibilityTest(“68”)`
|
||||
* Run tests.
|
||||
* Copy generated test (see instructions above) into MeasureUnitTest.java
|
||||
* Run tests again to ensure that new code is backward compatible with itself
|
||||
|
||||
## Update ICU4C
|
||||
|
||||
* checkout ICU4C
|
||||
|
||||
### Update measunit.h
|
||||
|
||||
* Change testZZZ to run `generateCXXHConstants(“68”); // ICU 68`.
|
||||
* Run MeasureUnitTest.java, copy the generated code (see instructions above).
|
||||
* Open $GIT_ROOT/icu4c/source/i18n/unicode/measunit.h. Look for line containing:
|
||||
|
||||
`// Start generated createXXX methods`
|
||||
* Look for line:
|
||||
|
||||
`// End generated createXXX methods`
|
||||
* Replace all the generated code in between with the contents of the clipboard
|
||||
|
||||
### Update measunit.cpp
|
||||
|
||||
* Change testZZZ to run generateCXXConstants();
|
||||
* Run MeasureUnitTest.java, copy the generated code (see instructions above).
|
||||
* Open $GIT_ROOT/icu4c/source/i18n/measunit.cpp. Look for line containing:
|
||||
|
||||
`// Start generated code for measunit.cpp`
|
||||
* Look for lines
|
||||
|
||||
`// End generated code for measunit.cpp`
|
||||
* Replace all the generated code in between with the contents of the clipboard
|
||||
|
||||
### Run C++ tests
|
||||
|
||||
* Run `./intltest format/MeasureFormatTest` from `test/intltest` to ensure new
|
||||
code is backward compatible.
|
||||
* Create a compatibility test for ICU 68. Change `testZZZ` in eclipse to run
|
||||
`generateCXXBackwardCompatibilityTest(“68”)`
|
||||
* Run tests.
|
||||
* Copy generated test (see instructions above) into
|
||||
$GIT_ROOT/icu4c/source/test/intltest/measfmttest.cpp. Make other necessary
|
||||
changes to make test compile. You can find these changes by searching for
|
||||
`TestCompatible65()`
|
||||
* Run tests again to ensure that new code is backward compatible with itself
|
||||
|
||||
## Finishing changes
|
||||
|
||||
These last changes are necessary to permanently record the ICU version number of
|
||||
any new measure units. Without these changes any new functions for this release
|
||||
will be considered new for the next release too.
|
||||
|
||||
* Change `testZZZ` to run `updateJAVAVersions(“68”);`
|
||||
* Run MeasureUnitTest.java, copy the generated code (see instructions above).
|
||||
* Append the clipboard contents to the values of the JAVA_VERSIONS variable
|
||||
near the top of MeasureUnitTest.java.
|
||||
|
||||
**Important:** what you are copying are just the new functions for the current
|
||||
ICU version, in this case 68. Therefore append, do not replace.
|
||||
|
||||
## Updating units.txt and unitConstants
|
||||
|
||||
The standard ldml2icu process is used to update ICU's resource files (see
|
||||
[cldr-icu-readme.txt](https://github.com/unicode-org/icu/blob/main/icu4c/source/data/cldr-icu-readme.txt)).
|
||||
CLDR's units.xml defines conversion rates in terms of some constants defined in
|
||||
`unitConstants`.
|
||||
|
||||
For efficiency and simplicity, ICU does not read `unitConstants` from the
|
||||
resource file. If any new constants are added, some code changes would be
|
||||
needed. This would be caught by `testUnitConstantFreshness` unit test in
|
||||
`units_test.cpp`.
|
||||
|
||||
They are hard-coded:
|
||||
* Java: `UnitConverter.java` has the constant names in
|
||||
`UnitConverter.Factor.addEntity()` and constant values in
|
||||
`UnitConverter.Factor.getConversionRate()`.
|
||||
* C++: `units_converter.cpp` has the constant names in
|
||||
`addSingleFactorConstant()`, with the constant values in `double
|
||||
constantsValues[]` in the `units_converter.h` header file.
|
|
@ -12,9 +12,11 @@ License & terms of use: http://www.unicode.org/copyright.html
|
|||
-->
|
||||
|
||||
# Updating MeasureUnit with new CLDR data
|
||||
|
||||
{: .no_toc }
|
||||
|
||||
## Contents
|
||||
|
||||
{: .no_toc .text-delta }
|
||||
|
||||
1. TOC
|
||||
|
@ -22,117 +24,94 @@ License & terms of use: http://www.unicode.org/copyright.html
|
|||
|
||||
---
|
||||
|
||||
This document explains how to update the C++ and Java version of the MeasureUnit
|
||||
This document explains how to update the C++ and Java version of the `MeasureUnit`
|
||||
class with new CLDR data.
|
||||
|
||||
Code is generated by running MeasureUnitTest.java unit tests, which writes
|
||||
generated code to System.out. Two ways to access this:
|
||||
This document applies to ICU 77 and later.
|
||||
For older versions see updating-measure-unit-old.md
|
||||
|
||||
1. Within **eclipse**:
|
||||
- Open MeasureUnitTest.java, run it by clicking on the green play button on
|
||||
menu bar.
|
||||
- Copy the generated code from the eclipse console to the clipboard.
|
||||
Make sure `DRAFT_VERSION_SET` at top of
|
||||
`./icu4j/main/common_tests/src/test/java/com/ibm/icu/dev/test/format/MeasureUnitGeneratorTest.java`
|
||||
is set correctly. \
|
||||
These are the ICU versions that have draft methods.
|
||||
|
||||
2. With **ant**:
|
||||
- Run: `ant checkTest
|
||||
-Dtestclass='com.ibm.icu.dev.test.format.MeasureUnitTest'`
|
||||
- Open the checkTest output: `out/junit-results/checkTest/html/index.html`
|
||||
- Navigate to "System.out" at the bottom of the MeasureUnitTest page to find
|
||||
the generated code, and copy to the clipboard.
|
||||
The code is generated by running `MeasureUnitGeneratorTest.java` unit tests, which writes
|
||||
generated code to various file.
|
||||
|
||||
After syncing CLDR data with ICU do the following. This documentation assumes
|
||||
that you are updating the MeasureUnit clases for ICU 68.
|
||||
1. With **maven** (command line):
|
||||
- Change folder to `{icuRoot}/icu4j`
|
||||
- run `mvn install -DskipTests -DskipITs`
|
||||
- run `mvn install -q -Dtest=MeasureUnitGeneratorTest -DgenerateMeasureUnitUpdate -f main/common_tests`
|
||||
|
||||
* Check out
|
||||
$GIT_ROOT/icu4j/main/common_tests/src/test/java/com/ibm/icu/dev/test/format/MeasureUnitTest.java
|
||||
* Open MeasureUnitTest.java.
|
||||
* Find the `testZZZ` test, its code should all be commented out. This test will
|
||||
execute last and will run the desired code.
|
||||
2. Within **Eclipse**:
|
||||
- Open `MeasureUnitGeneratorTest.java`, find the `generateUnitTestsUpdate` methods
|
||||
and run it by clicking on the green play button on menu bar. \
|
||||
Choose "JUnit Test" if asked. \
|
||||
This will not generate the update, but it will run the test and create a "Run Configuration". \
|
||||
Open it (Main menu -- "Run" -- "Run Configurations"), select the one named
|
||||
`MeasureUnitGeneratorTest.generateUnitTestsUpdate`, go to the "Arguments" tab and add
|
||||
`-DgenerateMeasureUnitUpdate` to the "VM Arguments" text area.
|
||||
|
||||
Make sure DRAFT_VERSIONS at top of MeasureUnitTest.java is set correctly.
|
||||
These are the ICU versions that have draft methods.
|
||||
Both methods will generate files with in `icu4j/main/common_tests/target/` folder. \
|
||||
The file names and the logging to the standard output will guide you.
|
||||
|
||||
## Update MeasureUnit.java
|
||||
It currently looks something like this:
|
||||
```
|
||||
Copy the generated code fragments from / to
|
||||
/some/absolute/path/icu4j/main/common_tests/target/MeasureUnit.java \
|
||||
/some/absolute/path/icu4j/main/core/src/main/java/com/ibm/icu/util/MeasureUnit.java
|
||||
|
||||
* Change `testZZZ` to run `generateConstants(“68”); // ICU 68.`
|
||||
* Run MeasureUnitTest.java, copy the generated code (see instructions above).
|
||||
* Open MeasureUnit.java:
|
||||
$GIT_ROOT/icu4j/main/core/src/main/java/com/ibm/icu/util/MeasureUnit.java
|
||||
* Look for line containing:
|
||||
Copy the generated code fragments from / to
|
||||
/some/absolute/path/icu4j/main/common_tests/target/MeasureUnitCompatibilityTest.java \
|
||||
/some/absolute/path/icu4j/main/common_tests/src/test/java/com/ibm/icu/dev/test/format/MeasureUnitCompatibilityTest.java
|
||||
|
||||
`// Start generated MeasureUnit constants`
|
||||
* Look for line containing:
|
||||
Copy the generated code fragments from / to
|
||||
/some/absolute/path/icu4j/main/common_tests/target/measunit.h \
|
||||
/some/absolute/path/icu4c/source/i18n/unicode/measunit.h
|
||||
|
||||
`// End generated MeasureUnit constants`
|
||||
* Replace all the generated code in between with the contents of the clipboard
|
||||
* Run the MeasureUnitTest.java to ensure that the new code is backward
|
||||
compatible. These compatibility tests are called something like
|
||||
`TestCompatible65`, which tests backward compatibility with ICU 65.
|
||||
* Create a compatibility test for ICU 68. Change `testZZZ` to run
|
||||
`generateBackwardCompatibilityTest(“68”)`
|
||||
* Run tests.
|
||||
* Copy generated test (see instructions above) into MeasureUnitTest.java
|
||||
* Run tests again to ensure that new code is backward compatible with itself
|
||||
Copy the generated code fragments from / to
|
||||
/some/absolute/path/icu4j/main/common_tests/target/measunit.cpp \
|
||||
/some/absolute/path/icu4c/source/i18n/measunit.cpp
|
||||
|
||||
## Update ICU4C
|
||||
Copy the generated code fragments from / to
|
||||
/some/absolute/path/icu4j/main/common_tests/target/measfmttest.cpp \
|
||||
/some/absolute/path/icu4c/source/test/intltest/measfmttest.cpp
|
||||
|
||||
* checkout ICU4C
|
||||
Copy the generated code fragments from / to
|
||||
/some/absolute/path/icu4j/main/common_tests/target/MeasureUnitGeneratorTest.java \
|
||||
/some/absolute/path/icu4j/main/common_tests/src/test/java/com/ibm/icu/dev/test/format/MeasureUnitGeneratorTest.java
|
||||
```
|
||||
|
||||
### Update measunit.h
|
||||
Some kind of diff tool or editor (for example `vi -d`) work nicely.
|
||||
|
||||
* Change testZZZ to run `generateCXXHConstants(“68”); // ICU 68`.
|
||||
* Run MeasureUnitTest.java, copy the generated code (see instructions above).
|
||||
* Open $GIT_ROOT/icu4c/source/i18n/unicode/measunit.h. Look for line containing:
|
||||
Look for line containing `// Start generated ...` and `// End generated ...`
|
||||
These lines exist in both the original files, and the generated one. \
|
||||
Replace all the generated code in between with the contents of the clipboard.
|
||||
|
||||
`// Start generated createXXX methods`
|
||||
* Look for line:
|
||||
If the generated code has no `// Start` ... `// End ...` pair then the new
|
||||
code should be appended at some fixed place (details below).
|
||||
|
||||
`// End generated createXXX methods`
|
||||
* Replace all the generated code in between with the contents of the clipboard
|
||||
* **`MeasureUnit.java`:** replace range.
|
||||
* **`MeasureUnitCompatibilityTest.java`:** append the new generated method at the end. \
|
||||
It is named something like `TestCompatible<version>()`. \
|
||||
Don't add it if it already exists.
|
||||
* **`measunit.h`:** replace range.
|
||||
* **`measunit.cpp`:** replace range.
|
||||
* **`measfmttest.cpp`:** append the new generated method after the last
|
||||
`MeasureFormatTest::TestCompatible<version>()` method. \
|
||||
Don't add it if it already exists. \
|
||||
WARNING: here you should add the method in two places. The method proper, with code,
|
||||
as generated, and the declaration in the class definition.
|
||||
* **`MeasureUnitGeneratorTest.java`:** append the new pairs of measure + version at
|
||||
the end of the `JAVA_VERSIONS` structure. \
|
||||
Don't add them if they already exist.
|
||||
|
||||
### Update measunit.cpp
|
||||
## Run tests for both `icu4c` and `icu4j`
|
||||
|
||||
* Change testZZZ to run generateCXXConstants();
|
||||
* Run MeasureUnitTest.java, copy the generated code (see instructions above).
|
||||
* Open $GIT_ROOT/icu4c/source/i18n/measunit.cpp. Look for line containing:
|
||||
## Updating `units.txt` and `unitConstants`
|
||||
|
||||
`// Start generated code for measunit.cpp`
|
||||
* Look for lines
|
||||
|
||||
`// End generated code for measunit.cpp`
|
||||
* Replace all the generated code in between with the contents of the clipboard
|
||||
|
||||
### Run C++ tests
|
||||
|
||||
* Run `./intltest format/MeasureFormatTest` from `test/intltest` to ensure new
|
||||
code is backward compatible.
|
||||
* Create a compatibility test for ICU 68. Change `testZZZ` in eclipse to run
|
||||
`generateCXXBackwardCompatibilityTest(“68”)`
|
||||
* Run tests.
|
||||
* Copy generated test (see instructions above) into
|
||||
$GIT_ROOT/icu4c/source/test/intltest/measfmttest.cpp. Make other necessary
|
||||
changes to make test compile. You can find these changes by searching for
|
||||
`TestCompatible65()`
|
||||
* Run tests again to ensure that new code is backward compatible with itself
|
||||
|
||||
## Finishing changes
|
||||
|
||||
These last changes are necessary to permanently record the ICU version number of
|
||||
any new measure units. Without these changes any new functions for this release
|
||||
will be considered new for the next release too.
|
||||
|
||||
* Change `testZZZ` to run `updateJAVAVersions(“68”);`
|
||||
* Run MeasureUnitTest.java, copy the generated code (see instructions above).
|
||||
* Append the clipboard contents to the values of the JAVA_VERSIONS variable
|
||||
near the top of MeasureUnitTest.java.
|
||||
|
||||
**Important:** what you are copying are just the new functions for the current
|
||||
ICU version, in this case 68. Therefore append, do not replace.
|
||||
|
||||
## Updating units.txt and unitConstants
|
||||
|
||||
The standard ldml2icu process is used to update ICU's resource files (see
|
||||
[cldr-icu-readme.txt](https://github.com/unicode-org/icu/blob/main/icu4c/source/data/cldr-icu-readme.txt)).
|
||||
The standard `ldml2icu` process is used to update ICU's resource files (see
|
||||
[`cldr-icu-readme.txt`](https://github.com/unicode-org/icu/blob/main/icu4c/source/data/cldr-icu-readme.txt)).
|
||||
CLDR's units.xml defines conversion rates in terms of some constants defined in
|
||||
`unitConstants`.
|
||||
|
||||
|
@ -142,6 +121,7 @@ needed. This would be caught by `testUnitConstantFreshness` unit test in
|
|||
`units_test.cpp`.
|
||||
|
||||
They are hard-coded:
|
||||
|
||||
* Java: `UnitConverter.java` has the constant names in
|
||||
`UnitConverter.Factor.addEntity()` and constant values in
|
||||
`UnitConverter.Factor.getConversionRate()`.
|
||||
|
|
|
@ -53,6 +53,15 @@ need to be correspondingly updated. See below for more files to be updated and s
|
|||
[icu4c/source/data/misc/icuver.txt](https://github.com/unicode-org/icu/blob/main/icu4c/source/data/misc/icuver.txt)
|
||||
needs to be updated with the correct version number for ICU and its data.
|
||||
|
||||
### CLDR-to-ICU Conversion
|
||||
|
||||
#### Since ICU 77
|
||||
|
||||
The tool takes the `icuVersion` and `icuDataVersion` from the official ICU APIs.
|
||||
(from the icu4j listed as a dependency of the tool, usually the one you just built from the `icu4j` folder).
|
||||
|
||||
If you need values different than that, you can specify them as the command line parameters (`--icuVersion` and `--icuDataVersion`).
|
||||
|
||||
#### Since ICU 68
|
||||
|
||||
In
|
||||
|
@ -164,7 +173,7 @@ Changing the version for Java starting with ICU 74 requires a few steps:
|
|||
2. [icu4j/main/core/src/test/java/com/ibm/icu/dev/test/util/DebugUtilitiesData.java](https://github.com/unicode-org/icu/blob/main/icu4j/main/core/src/test/java/com/ibm/icu/dev/test/util/DebugUtilitiesData.java)
|
||||
|
||||
There is a public string named `ICU4C_VERSION` which should be updated accordingly.
|
||||
'public static final String ICU4C_VERSION="74.0.1";'
|
||||
`public static final String ICU4C_VERSION="74.0.1";`
|
||||
|
||||
3. When creating the final release of a major ICU version,
|
||||
or a point release (minor version update on a maintenance branch),
|
||||
|
@ -195,13 +204,13 @@ The command requires a version number string that follows the typical Java / Mav
|
|||
This can be done by running the following command:
|
||||
|
||||
```
|
||||
mvn versions:set-property -DnewVersion=74 -Dproperty=icu.major.version
|
||||
mvn versions:set-property -DnewVersion=74 -Dproperty=icu.major.version -DgenerateBackupPoms=false
|
||||
```
|
||||
|
||||
This should happen at the same time and along with the work in the previous step for the version number
|
||||
when the version number is updated on `main` in the commit after the release/maintanence branch is cut.
|
||||
In other words, the above `versions:set-property` step should be executed at the same time
|
||||
`mvn versions:set -DnewVersion=74.0.1-SNAPSHOT` is executed.
|
||||
`mvn versions:set -DnewVersion=74.0.1-SNAPSHOT -DgenerateBackupPoms=false` is executed.
|
||||
|
||||
5. Update the following variables in `icu4j/releases_tools/shared.sh`
|
||||
|
||||
|
@ -212,8 +221,18 @@ The command requires a version number string that follows the typical Java / Mav
|
|||
|
||||
6. cldr-to-icu build tool has a dependency on the icu4j packages which needs to be updated in [`tools/cldr/cldr-to-icu/pom.xml`](https://github.com/unicode-org/icu/blob/main/tools/cldr/cldr-to-icu/pom.xml). Please update it to match the version that was updated in `icu4j/pom.xml` in the steps above.
|
||||
|
||||
`<version>74.0.1-SNAPSHOT</version>`
|
||||
```xml
|
||||
<version>74.0.1-SNAPSHOT</version>
|
||||
```
|
||||
|
||||
Since ICU 77 this moved to a property:
|
||||
```xml
|
||||
<icu4j.version>77.0.1-SNAPSHOT</icu4j.version>
|
||||
```
|
||||
Which can be easily be set from command line:
|
||||
```sh
|
||||
mvn versions:set-property -Dproperty=icu4j.version -DnewVersion=77.1 -f $ICU_DIR/tools/cldr/cldr-to-icu -DgenerateBackupPoms=false
|
||||
```
|
||||
|
||||
#### Until ICU 73 (inclusive)
|
||||
|
||||
|
@ -274,7 +293,7 @@ For updating ICU version numbers, follow the steps below.
|
|||
3. [icu4j/main/core/src/main/java/com/ibm/icu/util/VersionInfo.java](https://github.com/unicode-org/icu/blob/main/icu4j/main/core/src/main/java/com/ibm/icu/util/VersionInfo.java)
|
||||
|
||||
There is a static block starting at line 501 (as of 54.1) in the source file.
|
||||
|
||||
|
||||
Update the `ICU_VERSION` value, where the first three arguments represent the
|
||||
major, minor, and patch versions of a semantic version.
|
||||
Use the `getInstance(major, 0, 1, 0)` as the version during pre-release development,
|
||||
|
|
|
@ -66,8 +66,7 @@ classes.*
|
|||
When a calendar object is created, via either `Calendar::create()`, or
|
||||
`ucal_open()`, or indirectly within a date formatter, ICU looks up the 'default'
|
||||
calendar type for that locale. At present, all locales default to a Gregorian
|
||||
calendar, except for the compatibility locales th_TH_TRADITIONAL and
|
||||
ja_JP_TRADITIONAL. If the "calendar" keyword is supplied, this value will
|
||||
calendar. If the "calendar" keyword is supplied, this value will
|
||||
override the default for that locale.
|
||||
|
||||
For instance, `Calendar::createInstance("fr_FR", status)` will create a Gregorian calendar,
|
||||
|
|
|
@ -29,7 +29,7 @@ ICU4J's unit tests in JUnit).
|
|||
|
||||
ICU uses Continuous Integration systems to run these tests automatically for each new code contribution,
|
||||
and upon each update to a future contribution under development
|
||||
(that is: for each [successful Pull Request merge, and upon a new push of new git commits to a Pull Request](../gitdev.md)).
|
||||
(that is: for each [successful Pull Request merge, and upon a new push of new git commits to a Pull Request](./gitdev.md)).
|
||||
ICU has GitHub Actions configured to run Continuous Integration testing.
|
||||
|
||||
Continuous Integration systems can also be used to regularly and automatically run other tasks besides testing.
|
||||
|
|
|
@ -198,41 +198,9 @@ Coding examples help users to understand the usage of each API. Whenever
|
|||
possible, it is encouraged to embed a code snippet illustrating the usage of an
|
||||
API along with the functional specification.
|
||||
|
||||
#### Embedding Coding Examples in ICU4J - JCite
|
||||
|
||||
Since ICU4J 49M2, the ICU4J ant build target "doc" utilizes an external tool
|
||||
called [JCite](https://arrenbrecht.ch/jcite/). The tool allows us to cite a
|
||||
fragment of existing source code into JavaDoc comment using a tag. To embed a
|
||||
code snippet with the tag. For example,
|
||||
`{@.jcite com.ibm.icu.samples.util.timezone.BasicTimeZoneExample:---getNextTransitionExample}`
|
||||
will be replaced a fragment of code marked by comment lines
|
||||
`// ---getNextTransisionExample` in `BasicTimeZoneExample.java` in package
|
||||
`com.ibm.icu.samples.util.timezone`. When embedding code snippet using JCite, we
|
||||
recommend to follow next guidelines
|
||||
|
||||
* A sample code should be placed in `<icu4j_root>/samples/src` directory,
|
||||
although you can cite any source fragment from source files in
|
||||
`<icu4j_root>/demos/src`, `<icu4j_root\>/main/core/*/src`,
|
||||
`<icu4j_root>/main/test/*/src`.
|
||||
* A sample code should use package name -
|
||||
`com.ibm.icu.samples.<subpackage>.<facility>`. `<subpackage>` is corresponding
|
||||
to the target ICU API class's package, that is, one of lang/math/text/util.
|
||||
`<facility>` is a name of facility, which is usually the base class of the
|
||||
service. For example, use package `com.ibm.icu.samples.text.dateformat` for
|
||||
samples related to ICU's date format service,
|
||||
`com.ibm.icu.samples.util.timezone` for samples related to time zone service.
|
||||
* A sample code should be self-contained as much as possible (use only JDK and
|
||||
ICU public APIs if possible). This allows readers to cut & paste a code
|
||||
snippet to try it out easily.
|
||||
* The citing comment should start with three consecutive hyphen followed by
|
||||
lower camel case token - for example, "`// ---compareToExample`"
|
||||
* Keep in mind that the JCite tag `{@.jcite ...}` is not resolved without JCite.
|
||||
It is encouraged to avoid placing code snippet within a sentence. Instead,
|
||||
you should place a code snippet using JCite in an independent paragraph.
|
||||
|
||||
#### Embedding Coding Examples in ICU4C
|
||||
|
||||
Also since ICU4C 49M2, ICU4C docs (using the [\\snippet command](http://www.doxygen.nl/manual/commands.html#cmdsnippet)
|
||||
Since ICU4C 49M2, ICU4C docs (using the [\\snippet command](http://www.doxygen.nl/manual/commands.html#cmdsnippet)
|
||||
which is new in Doxygen 1.7.5) can cite a fragment of existing sample or test code.
|
||||
|
||||
Example in `ucnv.h`:
|
||||
|
|
|
@ -596,4 +596,4 @@ every Saturday (at 4:00 AM UTC) and post merging on the maintenance branches.
|
|||
They do not run on pull-requests by default as they take 1-2 hours to run.
|
||||
|
||||
However, you can manually request the CI builds to run the exhaustive tests.
|
||||
See [Continuous Integration / Exhaustive Tests](../userguide/dev/ci.md#exhaustive-tests).
|
||||
See [Continuous Integration / Exhaustive Tests](./ci.md#exhaustive-tests).
|
||||
|
|
|
@ -212,6 +212,16 @@ The rule updates are done first for ICU4C, and then ported (code changes) or mov
|
|||
|
||||
Updating the test with new or revised rules requires changing the test source code, in `icu4c/source/test/intltest/rbbitst.cpp`. Look for the classes RBBICharMonkey, RBBIWordMonkey, RBBISentMonkey and RBBILineMonkey. The body of each class tracks the corresponding UAX-14 or UAX-29 specifications in defining the character classes and break rules.
|
||||
|
||||
The rules, as well as the partition of the code space used to generate the random sample strings,
|
||||
are defined by regular expressions and Unicode sets generated by GenerateBreakTest in the
|
||||
Unicode tools, which runs as part of MakeUnicodeFiles.
|
||||
Copy the relevant lines from `Generated/UCD/17.0.0/extra/*BreakTest.cpp.txt` into `rbbitst.cpp`.
|
||||
When developing changes to the line breaking algorithms that require changes to property assignments,
|
||||
the generated rules and partition may need to be adjusted for testing.
|
||||
However, the updated rules should only be merged into ICU once the property changes have actually been
|
||||
made in the UCD and imported into ICU, at which point the unmodified generated partition and rules can
|
||||
be used in `rbbitst.cpp`.
|
||||
|
||||
After making changes, as a final check, let the test run for an extended period of time, on the order of several hours.
|
||||
Run it from a terminal, and just interrupt it (Ctrl-C) when it's gone long enough.
|
||||
|
||||
|
|
BIN
docs/userguide/format_parse/messages/HelloMF2.zip
Normal file
BIN
docs/userguide/format_parse/messages/HelloMF2.zip
Normal file
Binary file not shown.
37
docs/userguide/format_parse/messages/hello_mf2.cpp
Normal file
37
docs/userguide/format_parse/messages/hello_mf2.cpp
Normal file
|
@ -0,0 +1,37 @@
|
|||
// © 2025 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include "unicode/utypes.h"
|
||||
#include "unicode/calendar.h"
|
||||
#include "unicode/errorcode.h"
|
||||
#include "unicode/locid.h"
|
||||
#include "unicode/messageformat2.h"
|
||||
|
||||
using namespace icu;
|
||||
|
||||
int main() {
|
||||
ErrorCode errorCode;
|
||||
UParseError parseError;
|
||||
|
||||
icu::Calendar* cal(Calendar::createInstance(errorCode));
|
||||
cal->set(2025, Calendar::JANUARY, 28);
|
||||
UDate date = cal->getTime(errorCode);
|
||||
|
||||
message2::MessageFormatter::Builder builder(errorCode);
|
||||
message2::MessageFormatter mf = builder
|
||||
.setPattern("Hello {$user}, today is {$now :date style=long}!", parseError, errorCode)
|
||||
.setLocale(Locale("en_US"))
|
||||
.build(errorCode);
|
||||
|
||||
std::map<UnicodeString, message2::Formattable> argsBuilder;
|
||||
argsBuilder["user"] = message2::Formattable("John");
|
||||
argsBuilder["now"] = message2::Formattable::forDate(date);
|
||||
message2::MessageArguments arguments(argsBuilder, errorCode);
|
||||
|
||||
icu::UnicodeString result = mf.formatToString(arguments, errorCode);
|
||||
std::string strResult;
|
||||
result.toUTF8String(strResult);
|
||||
std::cout << strResult << std::endl;
|
||||
}
|
|
@ -27,31 +27,33 @@ It will be a successor to the current [ICU MessageFormat](index.md).
|
|||
MessageFormat 2.0 is being developed
|
||||
[in a working group](https://github.com/unicode-org/message-format-wg),
|
||||
which has created a [draft specification](https://github.com/unicode-org/message-format-wg/tree/main/spec).
|
||||
A version of the specification is included in [LDML 45](https://unicode.org/reports/tr35/tr35-messageFormat.html#Contents).
|
||||
Also see the
|
||||
[API docs for `MessageFormatter`](https://unicode-org.github.io/icu-docs/apidoc/released/icu4j/index.html?com/ibm/icu/message2/MessageFormatter.html).*
|
||||
|
||||
## Overview of `MessageFormatter`
|
||||
|
||||
In ICU4J, the `MessageFormatter` class is the next iteration of [MessageFormat](https://unicode-org.github.io/icu-docs/apidoc/released/icu4j/com/ibm/icu/text/MessageFormat.html).
|
||||
This new version will build on the lessons learned from using MessageFormat for 25 years in various environments, when used directly or as a base for other public APIs.
|
||||
The `MessageFormatter` class is the next iteration of MessageFormat, implemented in both [ICU4J](https://unicode-org.github.io/icu-docs/apidoc/released/icu4j/com/ibm/icu/text/MessageFormat.html) and [ICU4C](https://unicode-org.github.io/icu-docs/apidoc/released/icu4c/classicu_1_1message2_1_1MessageFormatter.html)
|
||||
This new version builds on the lessons learned from using MessageFormat for 25 years in various environments, when used directly or as a base for other public APIs.
|
||||
|
||||
The effort to design a succesor to `MessageFormat` will result in a specification referred to as MessageFormat 2.0.
|
||||
The effort to design a successor to `MessageFormat` is a specification referred to as MessageFormat 2.0.
|
||||
The reasoning for this effort is shared in the [“Why MessageFormat needs a successor”](https://github.com/unicode-org/message-format-wg/blob/main/docs/why_mf_next.md) document.
|
||||
|
||||
MessageFormat 2.0 will be more modular and easier to port and backport.
|
||||
It will also provide extension points via interfaces to allow users to supply new formatters and selectors without having to modify the specification.
|
||||
MessageFormat 2.0 is more modular and easier to port and backport.
|
||||
It also provides extension points via interfaces to allow users to supply new formatters and selectors without having to modify the specification.
|
||||
ICU will eventually include support for new formatters, such as intervals, relative time, lists, measurement units, personal names, and more, as well as the ability for users to supply their own custom implementations.
|
||||
These will potentially support use cases like grammatical gender, inflection, markup regimes (such as those require for text-to-speech), and other complex message management needs.
|
||||
|
||||
The MessageFormat Working Group, which develops the new data model, semantics, and syntax, is hosted on [GitHub](https://github.com/unicode-org/message-format-wg).
|
||||
The current specification for the syntax and data model can be found [here](https://github.com/unicode-org/message-format-wg/blob/main/spec/syntax.md).
|
||||
|
||||
This technical preview implements enough functions for `MessageFormater` to be useful in many situations,
|
||||
but the final set of functions and the parameters accepted by those functions is not yet finalized.
|
||||
This technical preview implements functions according to the LDML 45 version of the specification.
|
||||
|
||||
## Examples
|
||||
### ICU4J
|
||||
|
||||
### Basic usage
|
||||
#### Examples
|
||||
|
||||
##### Basic usage
|
||||
|
||||
```java
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
@ -81,7 +83,7 @@ public void testMf2() {
|
|||
}
|
||||
```
|
||||
|
||||
### Placeholder examples
|
||||
##### Placeholder examples
|
||||
|
||||
| Code to set runtime value for placeholder | Examples of placeholder in message pattern |
|
||||
|----------------------------------------------------|------------------------------------------------------------------------------|
|
||||
|
@ -91,7 +93,7 @@ public void testMf2() {
|
|||
| No argument for fixed values known at build time | `{(123456789.531) :number}` |
|
||||
|
||||
|
||||
### Plural selection message
|
||||
#### Plural selection message
|
||||
|
||||
```java
|
||||
@Test
|
||||
|
@ -123,12 +125,11 @@ public void testMf2Selection() {
|
|||
}
|
||||
```
|
||||
|
||||
### Built-in formatter functions
|
||||
#### Built-in formatter functions
|
||||
|
||||
The tech preview implementation comes with formatters for numbers (`number`),
|
||||
date / time (`datetime`),
|
||||
plural selectors (`plural` and `selectordinal`),
|
||||
and general selector (`select`),
|
||||
The tech preview implementation comes with a formatter and selector for numbers (`number`),
|
||||
date / time formatters (`datetime`),
|
||||
and a string selector (`string`),
|
||||
very similar to what MessageFormat offers.
|
||||
|
||||
The [ICU test code](https://github.com/unicode-org/icu/tree/main/icu4j/main/core/src/test/java/com/ibm/icu/dev/test/message2)
|
||||
|
@ -136,9 +137,10 @@ covers most features, and has examples of how to make custom placeholder formatt
|
|||
you can look for classes that implement `com.ibm.icu.message2.FormatterFactory`
|
||||
(they are named `Custom*Test.java`).
|
||||
|
||||
## Functions currently implemented
|
||||
#### Functions currently implemented
|
||||
|
||||
These are the functions implemented right now:
|
||||
These are the functions implemented in ICU 75.1. The functions will change
|
||||
in a future release to be consistent with the current MF2 specification.
|
||||
|
||||
|
||||
<table border="1">
|
||||
|
@ -191,19 +193,19 @@ TBD if this will be merged into <code>plural</code> (with some <code>kind</code>
|
|||
<tr><td><code>select</code></td><td>Literal match, same as MessageFormat's <code>select</code>.</td></tr>
|
||||
</table>
|
||||
|
||||
## Quickstart guide
|
||||
#### Quickstart guide
|
||||
|
||||
If you don't have ICU set up, here are instructions for doing that using Maven or Gradle:
|
||||
|
||||
### Requirements
|
||||
##### Requirements
|
||||
|
||||
- JDK (version 8 or newer)
|
||||
- Maven or Gradle
|
||||
- Your preferred IDE or text editor
|
||||
|
||||
### Maven
|
||||
##### Maven
|
||||
|
||||
#### Create a new project
|
||||
###### Create a new project
|
||||
|
||||
```
|
||||
$ mvn archetype:generate -DgroupId=org.unicode -DartifactId=mf2 -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=1.4 -DinteractiveMode=false
|
||||
|
@ -211,7 +213,7 @@ $ mvn archetype:generate -DgroupId=org.unicode -DartifactId=mf2 -DarchetypeArtif
|
|||
$ cd mf2
|
||||
```
|
||||
|
||||
#### Add a dependency to ICU4J 72.1 (or newer)
|
||||
###### Add a dependency to ICU4J 75.1 (or newer)
|
||||
|
||||
In the `pom.xml` find the `<dependencies>` element and add this:
|
||||
|
||||
|
@ -219,24 +221,24 @@ In the `pom.xml` find the `<dependencies>` element and add this:
|
|||
<dependency>
|
||||
<groupId>com.ibm.icu</groupId>
|
||||
<artifactId>icu4j</artifactId>
|
||||
<version>72.1</version>
|
||||
<version>75.1</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
#### Add a bit of code
|
||||
###### Add a bit of code
|
||||
|
||||
Open the test file (`src/test/java/org/unicode/AppTest.java`)
|
||||
and copy / paste the include directives and the `testMf2()` method shown in the previous section.
|
||||
|
||||
#### Test it
|
||||
###### Test it
|
||||
|
||||
```
|
||||
$ mvn test
|
||||
```
|
||||
|
||||
### Gradle
|
||||
##### Gradle
|
||||
|
||||
#### Create a new project
|
||||
###### Create a new project
|
||||
|
||||
```
|
||||
$ mkdir mf2
|
||||
|
@ -246,25 +248,25 @@ $ cd mf2
|
|||
$ gradle init --dsl groovy --test-framework junit --type java-application --package org.unicode --project-name mf2
|
||||
```
|
||||
|
||||
#### Add a dependency to ICU4J 72.1 (or newer)
|
||||
###### Add a dependency to ICU4J 75.1 (or newer)
|
||||
|
||||
In the `app/build.gradle` file, find the `dependencies {...}` section add this:
|
||||
|
||||
```
|
||||
implementation 'com.ibm.icu:icu4j:72.1'
|
||||
```
|
||||
#### Add a bit of code
|
||||
###### Add a bit of code
|
||||
|
||||
Open the test file (`src/test/java/org/unicode/AppTest.java`)
|
||||
and copy / paste the include directives and the `testMf2()` method shown in the previous section.
|
||||
|
||||
#### Test it
|
||||
##### Test it
|
||||
|
||||
```
|
||||
$ gradle test
|
||||
```
|
||||
|
||||
### Experiment from here
|
||||
##### Experiment from here
|
||||
|
||||
At this point you have a basic application using MessageFormat 2.
|
||||
|
||||
|
@ -276,3 +278,8 @@ You can experiment with more messages using as inspiration:
|
|||
|
||||
You should be able to use your preferred IDE (Eclipse, IntelliJ, Visual Studio Code, more), use a different build system, etc.
|
||||
|
||||
### ICU4C
|
||||
|
||||
Some helpful documentation for ICU4C in MF2 is being developed at [messageformat.dev](https://messageformat.dev/docs/integration/cpp/),
|
||||
as well an unofficial [MF2 syntax documentation](https://messageformat.dev/docs/quick-start/)
|
||||
and an interactive [playground](https://messageformat.dev/playground/) for testing messages.
|
||||
|
|
366
docs/userguide/format_parse/messages/try-mf2.md
Normal file
366
docs/userguide/format_parse/messages/try-mf2.md
Normal file
|
@ -0,0 +1,366 @@
|
|||
---
|
||||
layout: default
|
||||
title: Trying MF 2.0 Final Candidate
|
||||
nav_order: 3
|
||||
parent: Formatting Messages
|
||||
grand_parent: Formatting
|
||||
---
|
||||
<!--
|
||||
© 2025 and later: Unicode, Inc. and others.
|
||||
License & terms of use: http://www.unicode.org/copyright.html
|
||||
-->
|
||||
|
||||
# Trying MF 2.0 Final Candidate
|
||||
{: .no_toc }
|
||||
|
||||
## Contents
|
||||
{: .no_toc .text-delta }
|
||||
|
||||
1. TOC
|
||||
{:toc}
|
||||
|
||||
---
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## C++ Linux & macOS
|
||||
|
||||
|
||||
1. Prepare a sandbox folder
|
||||
|
||||
```sh
|
||||
export ICU_SANDBOX=~/hello_icu_mf2
|
||||
mkdir $ICU_SANDBOX
|
||||
cd $ICU_SANDBOX
|
||||
```
|
||||
|
||||
1. Build ICU4C (you only need to do this once)
|
||||
|
||||
```sh
|
||||
git clone https://github.com/unicode-org/icu.git
|
||||
pushd icu/icu4c/source
|
||||
|
||||
# Run this and choose the platform and toolchain you prefer
|
||||
./runConfigureICU --help
|
||||
|
||||
# if macOS
|
||||
./runConfigureICU macOS/gcc
|
||||
# else if Linux (gcc is just an example, there are 5 Linux options)
|
||||
./runConfigureICU Linux/gcc
|
||||
# end
|
||||
|
||||
export DESTDIR=$ICU_SANDBOX/icu_release
|
||||
make -j8 releaseDist
|
||||
popd
|
||||
```
|
||||
|
||||
1. Create a minimal C++ file here (we are in the `$ICU_SANDBOX` folder) called [`hello_mf2.cpp`](hello_mf2.cpp) (click to view and/or download). The contents are reproduced below.
|
||||
|
||||
```cpp
|
||||
// hello_mf2.cpp
|
||||
#include <iostream>
|
||||
|
||||
#include "unicode/utypes.h"
|
||||
#include "unicode/calendar.h"
|
||||
#include "unicode/errorcode.h"
|
||||
#include "unicode/locid.h"
|
||||
#include "unicode/messageformat2.h"
|
||||
|
||||
using namespace icu;
|
||||
|
||||
int main() {
|
||||
ErrorCode errorCode;
|
||||
UParseError parseError;
|
||||
|
||||
icu::Calendar* cal(Calendar::createInstance(errorCode));
|
||||
cal->set(2025, Calendar::JANUARY, 28);
|
||||
UDate date = cal->getTime(errorCode);
|
||||
|
||||
message2::MessageFormatter::Builder builder(errorCode);
|
||||
message2::MessageFormatter mf = builder
|
||||
.setPattern("Hello {$user}, today is {$now :date style=long}!", parseError, errorCode)
|
||||
.setLocale(Locale("en_US"))
|
||||
.build(errorCode);
|
||||
|
||||
std::map<UnicodeString, message2::Formattable> argsBuilder;
|
||||
argsBuilder["user"] = message2::Formattable("John");
|
||||
argsBuilder["now"] = message2::Formattable::forDate(date);
|
||||
message2::MessageArguments arguments(argsBuilder, errorCode);
|
||||
|
||||
icu::UnicodeString result = mf.formatToString(arguments, errorCode);
|
||||
std::string strResult;
|
||||
result.toUTF8String(strResult);
|
||||
std::cout << strResult << std::endl;
|
||||
}
|
||||
```
|
||||
|
||||
1. Build your application and run it
|
||||
|
||||
```sh
|
||||
g++ hello_mf2.cpp -I$DESTDIR/usr/local/include -std=c++17 -L$DESTDIR/usr/local/lib -licuuc -licudata -licui18n
|
||||
|
||||
# if macOS
|
||||
DYLD_LIBRARY_PATH=$DESTDIR/usr/local/lib ./a.out
|
||||
# else if Linux
|
||||
LD_LIBRARY_PATH=$DESTDIR/usr/local/lib ./a.out
|
||||
# end
|
||||
```
|
||||
|
||||
This will output
|
||||
```
|
||||
Hello John, today is January 28, 2025!
|
||||
```
|
||||
|
||||
## C++ Windows with Visual Studio
|
||||
|
||||
### From Visual Studio with minimal work
|
||||
|
||||
These instructions will use a release version of ICU4C (tested with 76.1) and
|
||||
a "Hello ICU world" project already created.
|
||||
They provide minimal effort that only requires downloading and opening in Visual Studio
|
||||
before using.
|
||||
|
||||
> :point_right: **Note**: the MessageFormat 2 implementation in a previously release version may be behind the spec in the first few releases of ICU after the MF2.0 spec was declared 1.0 in CLDR 46.1,
|
||||
which occurred between ICU 76 and ICU 77. The difference between latest MF2.0 and the spec version supported in ICU may be minimal.
|
||||
|
||||
|
||||
1. Download the Visual Studio artifacts from the
|
||||
[official release of ICU 76.1](https://github.com/unicode-org/icu/releases/tag/release-76-1):
|
||||
* [icu4c-76_1-Win32-MSVC2022.zip](https://github.com/unicode-org/icu/releases/download/release-76-1/icu4c-76_1-Win32-MSVC2022.zip)
|
||||
* [icu4c-76_1-Win64-MSVC2022.zip](https://github.com/unicode-org/icu/releases/download/release-76-1/icu4c-76_1-Win64-MSVC2022.zip)
|
||||
|
||||
1. Download the "Hello ICU / MF2 World" project [HelloMF2.zip](HelloMF2.zip).
|
||||
|
||||
1. Unzip the files you just downloaded and merge the content of the two ICU folders.
|
||||
The "hello world" project to be a sibling to the icu folder.
|
||||
|
||||
1. The folder tree structure should look like this
|
||||
|
||||
```
|
||||
someFolderOfYourChoice\
|
||||
+- HelloMF2\
|
||||
| \- HelloMF2\
|
||||
\- icu\
|
||||
\- icu4c\
|
||||
+- bin\
|
||||
+- bin64\
|
||||
+- include\
|
||||
| \- unicode\
|
||||
+- lib\
|
||||
\- lib64\
|
||||
```
|
||||
|
||||
1. Open the `HelloMF2.sln` solution in Visual Studio and you are ready to go.
|
||||
|
||||
### From command line
|
||||
|
||||
Start the Visual Studio "x64 Native Tools Command Prompt for VS 20xx"
|
||||
|
||||
1. Prepare a sandbox folder
|
||||
|
||||
```cmd
|
||||
set ICU_SANDBOX=%USERPROFILE%\hello_icu_mf2
|
||||
md %ICU_SANDBOX%
|
||||
cd %ICU_SANDBOX%
|
||||
```
|
||||
|
||||
1. Build ICU4C (you only need to do this once):
|
||||
|
||||
```cmd
|
||||
git clone https://github.com/unicode-org/icu.git
|
||||
|
||||
cd icu\icu4c
|
||||
msbuild source/allinone/allinone.sln /p:Configuration=Release /p:Platform=x64 /p:SkipUWP=true
|
||||
cd ..\..
|
||||
|
||||
set DESTDIR=%ICU_SANDBOX%\icu_release
|
||||
rd /q/s %DESTDIR%
|
||||
md %DESTDIR%
|
||||
xcopy icu\icu4c\include %DESTDIR%\include /E /V /I /Q /Y
|
||||
xcopy icu\icu4c\bin64 %DESTDIR%\bin64 /E /V /I /Q /Y
|
||||
xcopy icu\icu4c\lib64 %DESTDIR%\lib64 /E /V /I /Q /Y
|
||||
```
|
||||
|
||||
1. Create a minimal C++ file here (we are in the `$ICU_SANDBOX` folder). Call it `hello_mf2.cpp`.
|
||||
The link to download and the contents are listed above (see the Linux section).
|
||||
|
||||
1. Build your application and run it
|
||||
|
||||
```cmd
|
||||
set DESTDIR=%ICU_SANDBOX%\icu_release
|
||||
cl /std:c++17 /EHsc /I %DESTDIR%\include %DESTDIR%/lib64/*.lib hello_mf2.cpp
|
||||
|
||||
rem set PATH only once, not every time
|
||||
set PATH=%DESTDIR%\bin64;%PATH%
|
||||
|
||||
.\hello_mf2.exe
|
||||
```
|
||||
|
||||
This will output
|
||||
```
|
||||
Hello John, today is January 28, 2025!
|
||||
```
|
||||
|
||||
### From Visual Studio (UI)
|
||||
|
||||
1. Prepare a sandbox folder. Call it `hello_icu_mf2`.
|
||||
|
||||
1. Build ICU4C (you only need to do this once)
|
||||
|
||||
* Clone the ICU repository from
|
||||
<https://github.com/unicode-org/icu> to the `hello_icu_mf2` folder.
|
||||
We will end up with the folder `hello_icu_mf2\icu`.
|
||||
|
||||
* Start Visual Studio.
|
||||
* Select _"Open a project or solution"_
|
||||
* Open the `allinone.sln` solution from the `hello_icu_mf2\icu\icu4c\source\allinone` folder.
|
||||
* Select the "Build" -- "Configuration Manager" menu
|
||||
* Change the active solution to "Release" and "x64" (or another architecture, but you will have to be consistent everywhere after this)
|
||||
* Select the "Build" -- "Build solution" menu
|
||||
* Select the "File" -- "Close solution" menu
|
||||
|
||||
1. Create a minimal C++ project in the `hello_icu_mf2` folder. Call it `hello_mf2`.
|
||||
|
||||
* You are still in Visual Studio. Select "Create a new project"
|
||||
* Choose the project template "Console App" (tagged `C++`, `Windows`, `Console`)
|
||||
* Click the "Next" button
|
||||
* Set the "Project name" to "HelloMF2" and set the "Location" to the `hello_icu_mf2` folder. \
|
||||
* Click "Create"
|
||||
* A project will be created in the `hello_icu_mf2\HelloMF2` folder.
|
||||
|
||||
1. Create a macro pointing to the ICU folder with the files we built.
|
||||
|
||||
* Select the "View" -- "Property Manager" menu
|
||||
* In the new dialog select the root of the tree ("HelloMF2", not the Debug / Release leafs)
|
||||
* Right click and select "Add New Project Property Sheet..."
|
||||
* Call it `IcuPropertySheet.props` and click "Add"
|
||||
* Open (double-click) `IcuPropertySheet` in any of the "leafs" of the tree on the left.
|
||||
For example in `HelloMF2 / Release | 64 / IcuPropertySheet`
|
||||
* Select "User Macros" under "Common Properties" (left tree)
|
||||
* Click the "Add Macro" button
|
||||
* Name it `IcuDistro` and set the "Value" to the `..\icu\icu4c` folder.
|
||||
If the test project we created is not in `hello_icu_mf2`, next to `icu`, then you can use a full path to the ICU folder where you just did a built.
|
||||
You can also point it to one you downloaded (from the GitHub releases, see above).
|
||||
* Click the "OK" button
|
||||
|
||||
1. Configure the project
|
||||
|
||||
* Select `HelloMF2` in the left-side tree
|
||||
* Select the "Project" -- "Properties" menu
|
||||
* For "Configuration" (top-left) select "All Configurations"
|
||||
* For "Platform" (top-right) select "All Platforms"
|
||||
* In the left side tree:
|
||||
* "C/C++" / "General" set "Additional Include Directories" to
|
||||
`$(IcuDistro)\include;%(AdditionalIncludeDirectories)`
|
||||
* "C/C++" / "Language" set "C++ Language Standard" to
|
||||
`ISO C++17 Standard (/std:c++17)`
|
||||
* "Linker" / "General" set "Additional Dependencies" to \
|
||||
`icudt.lib;icuin.lib;icuuc.lib;$(CoreLibraryDependencies);%(AdditionalDependencies)`
|
||||
* "Linker" / "General" set "Additional Library Directories" to \
|
||||
`$(IcuDistro)/lib64;%(AdditionalLibraryDirectories)`
|
||||
* "Debugging" set "Environment" to \
|
||||
`PATH=$(IcuDistro)/bin64;%PATH%`
|
||||
* For "Platform" (top-right) select "Win32"
|
||||
* In the left side tree remove the `64` in two of the settings:
|
||||
* "Linker" / "General" set "Additional Library Directories" to \
|
||||
`$(IcuDistro)/lib;%(AdditionalLibraryDirectories)`
|
||||
* "Debugging" set "Environment" to \
|
||||
`PATH=$(IcuDistro)/bin;%PATH%`
|
||||
|
||||
1. Update the default source file to use some ICU functionality
|
||||
|
||||
* Select the "View" -- "Solution Explorer" menu
|
||||
* In the left-side tree "HelloMF2" / "Source Files" open `HelloMF2.cpp`
|
||||
* Download the `hello_mf2.cpp` file (see earlier in this page for download link) and save it as
|
||||
`HelloMF2.cpp`, thereby replacing it.
|
||||
|
||||
1. At this point you should be able to build and run the application, debug it, etc.
|
||||
|
||||
1. When run, it will output
|
||||
```
|
||||
Hello John, today is January 28, 2025!
|
||||
```
|
||||
|
||||
|
||||
## Java
|
||||
|
||||
We will assume that if you are interested in testing a pre-release Java library
|
||||
you already have (or know how to install) a JDK, Apache Maven, git,
|
||||
know how to create a project in your favorite IDE, and so on.
|
||||
|
||||
### What you need
|
||||
|
||||
* JDK, any version between 8 and 23
|
||||
* Apache Maven
|
||||
|
||||
### Instructions
|
||||
|
||||
1. Create a new Maven project
|
||||
|
||||
```sh
|
||||
mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=hello_icu_mf2 -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=1.5 -DinteractiveMode=false
|
||||
|
||||
cd hello_icu_mf2
|
||||
```
|
||||
|
||||
1. Modify the `pom.xml` file
|
||||
|
||||
1. The project created as above uses the Java 17 version.
|
||||
If you are using a lower version then change `<maven.compiler.release>` property to whatever Java version you are using.
|
||||
```sh
|
||||
# Example on how to set the Java version to 11
|
||||
mvn versions:set-property -Dproperty=maven.compiler.release -DnewVersion=11
|
||||
```
|
||||
|
||||
1. Edit the file and add this to `<dependencies>`
|
||||
```xml
|
||||
<dependency>
|
||||
<groupId>com.ibm.icu</groupId>
|
||||
<artifactId>icu4j</artifactId>
|
||||
<version>77.0.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
```
|
||||
**Warning:** make sure it is done in `dependencies`, not in `dependencyManagement / dependencies`
|
||||
|
||||
1. Edit the `src/test/java/com/mycompany/app/AppTest.java` file
|
||||
|
||||
1. Add a new test method
|
||||
```java
|
||||
@Test
|
||||
public void testMessageFormat2() {
|
||||
MessageFormatter mf2 = MessageFormatter.builder()
|
||||
.setLocale(Locale.US)
|
||||
.setPattern("Hello {$user}, today is {$now :date style=long}!")
|
||||
.build();
|
||||
Calendar cal = Calendar.getInstance();
|
||||
cal.set(2025, 0, 28);
|
||||
|
||||
Map<String, Object> arguments = new HashMap<>();
|
||||
arguments.put("user", "John");
|
||||
arguments.put("now", cal);
|
||||
System.out.println(mf2.formatToString(arguments));
|
||||
}
|
||||
```
|
||||
|
||||
1. Add imports
|
||||
|
||||
```java
|
||||
import java.util.HashMap;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import com.ibm.icu.util.Calendar;
|
||||
import com.ibm.icu.message2.MessageFormatter;
|
||||
```
|
||||
|
||||
1. Now run the tests
|
||||
|
||||
```sh
|
||||
mvn package -q
|
||||
```
|
||||
|
||||
This will output the following in the the tests' console output
|
||||
```
|
||||
Hello John, today is January 28, 2025!
|
||||
```
|
|
@ -20,6 +20,8 @@ License & terms of use: http://www.unicode.org/copyright.html
|
|||
|
||||
---
|
||||
|
||||
# WARNING: Please note that for ICU 78 (2025-oct) we are planning to remove the ICU4J Locale Service Provider. See the [ICU 77 page](https://unicode-org.github.io/icu/download/77.html) for details.
|
||||
|
||||
## Overview
|
||||
|
||||
Java SE 6 introduced a new feature which allows Java user code to extend locale
|
||||
|
|
|
@ -55,7 +55,7 @@ The ICU Data Build Tool enables you to write a configuration file that
|
|||
specifies what features and locales to include in a custom data bundle.
|
||||
|
||||
The configuration file may be written in either [JSON](http://json.org/) or
|
||||
[Hjson](https://hjson.org/). To build ICU4C with custom data, set the
|
||||
[Hjson](https://hjson.github.io/). To build ICU4C with custom data, set the
|
||||
`ICU_DATA_FILTER_FILE` environment variable when running `runConfigureICU` on
|
||||
Unix or when building the data package on Windows. For example:
|
||||
|
||||
|
|
|
@ -163,6 +163,10 @@ example, even if ICU is built in "files" mode, you must still link against the
|
|||
This option builds ICU data as a single (large) static library. This mode is
|
||||
more complex to use. If you encounter errors, you may need to build ICU
|
||||
multiple times.
|
||||
* `--with-data-packaging=auto`
|
||||
With this option, `configure` will pick `library` unless the options
|
||||
`--enable-static` and `--disable-shared` are also given, in which case
|
||||
it'll pic `static` instead.
|
||||
* `--with-data-packaging=files`
|
||||
With this option, ICU outputs separate individual files (.res, .cnv, etc)
|
||||
which will be loaded at runtime. Read the rest of this document, especially
|
||||
|
|
|
@ -391,11 +391,7 @@ and `Locale::createCanonical`. The latter API exists in both C++ and Java.
|
|||
es@collation=traditional, hi__DIRECT => hi@collation=direct, zh_TW_STROKE =>
|
||||
zh_TW@collation=stroke, zh__PINYIN => zh@collation=pinyin.
|
||||
|
||||
9. Variants specifying a calendar are remapped to calendar keyword specifiers,
|
||||
as follows: ja_JP_TRADITIONAL => ja_JP@calendar=japanese, th_TH_TRADITIONAL
|
||||
=> th_TH@calendar=buddhist.
|
||||
|
||||
10. Special case: C => en_US_POSIX.
|
||||
9. Special case: C => en_US_POSIX.
|
||||
|
||||
Certain other operations are not performed by either level 1 or level 2
|
||||
canonicalization. These are listed here for completeness.
|
||||
|
|
|
@ -503,7 +503,7 @@ the position, for those cases:
|
|||
The first rule will convert "x", when preceded by a vowel, into "ks". The
|
||||
transform will then backup to the position before the vowel and continue. In the
|
||||
next pass, the "ak" will match and be invoked. Thus, if the source text is "ax",
|
||||
the result will be "ack".
|
||||
the result will be "acks".
|
||||
|
||||
> :point_right: **Note**: *Although you can move the cursor forward or backward, it is limited in two
|
||||
ways: (a) to the text that is matched, (b) within the original substring that is
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -5,349 +5,199 @@
|
|||
License & terms of use: http://www.unicode.org/copyright.html
|
||||
-->
|
||||
|
||||
# ICU4C API Comparison: ICU 75 with ICU 76
|
||||
# ICU4C API Comparison: ICU 76 with ICU 77
|
||||
|
||||
> _Note_ Markdown format of this document is new for ICU 65.
|
||||
|
||||
- [Removed from ICU 75](#removed)
|
||||
- [Deprecated or Obsoleted in ICU 76](#deprecated)
|
||||
- [Changed in ICU 76](#changed)
|
||||
- [Promoted to stable in ICU 76](#promoted)
|
||||
- [Added in ICU 76](#added)
|
||||
- [Other existing drafts in ICU 76](#other)
|
||||
- [Removed from ICU 76](#removed)
|
||||
- [Deprecated or Obsoleted in ICU 77](#deprecated)
|
||||
- [Changed in ICU 77](#changed)
|
||||
- [Promoted to stable in ICU 77](#promoted)
|
||||
- [Added in ICU 77](#added)
|
||||
- [Other existing drafts in ICU 77](#other)
|
||||
- [Signature Simplifications](#simplifications)
|
||||
|
||||
## Removed
|
||||
|
||||
Removed from ICU 75
|
||||
Removed from ICU 76
|
||||
|
||||
| File | API | ICU 75 | ICU 76 |
|
||||
| File | API | ICU 76 | ICU 77 |
|
||||
|---|---|---|---|
|
||||
| messageformat2_data_model.h | Builder& icu::message2::MFDataModel::Builder::addUnsupportedStatement(UnsupportedStatement&&, UErrorCode&) | InternalICU 75 | (missing)
|
||||
| messageformat2_data_model.h | Builder& icu::message2::data_model::Operator::Builder::setReserved(Reserved&&) | InternalICU 75 | (missing)
|
||||
| messageformat2_data_model.h | Builder& icu::message2::data_model::Reserved::Builder::add(Literal&&, UErrorCode&) | InternalICU 75 | (missing)
|
||||
| messageformat2_data_model.h | Builder& icu::message2::data_model::Reserved::Builder::operator=(Builder&&)=delete | _untagged _ | (missing)
|
||||
| messageformat2_data_model.h | Builder& icu::message2::data_model::Reserved::Builder::operator=(const Builder&)=delete | _untagged _ | (missing)
|
||||
| messageformat2_data_model.h | Builder& icu::message2::data_model::UnsupportedStatement::Builder::addExpression(Expression&&, UErrorCode&) | InternalICU 75 | (missing)
|
||||
| messageformat2_data_model.h | Builder& icu::message2::data_model::UnsupportedStatement::Builder::operator=(Builder&&)=delete | _untagged _ | (missing)
|
||||
| messageformat2_data_model.h | Builder& icu::message2::data_model::UnsupportedStatement::Builder::operator=(const Builder&)=delete | _untagged _ | (missing)
|
||||
| messageformat2_data_model.h | Builder& icu::message2::data_model::UnsupportedStatement::Builder::setBody(Reserved&&) | InternalICU 75 | (missing)
|
||||
| messageformat2_data_model.h | Builder& icu::message2::data_model::UnsupportedStatement::Builder::setKeyword(const UnicodeString&) | InternalICU 75 | (missing)
|
||||
| messageformat2_data_model.h | Reserved icu::message2::data_model::Reserved::Builder::build(UErrorCode&) const | InternalICU 75 | (missing)
|
||||
| messageformat2_data_model.h | Reserved& icu::message2::data_model::Reserved::operator=(Reserved) | InternalICU 75 | (missing)
|
||||
| messageformat2_data_model.h | UnsupportedStatement icu::message2::data_model::UnsupportedStatement::Builder::build(UErrorCode&) const | InternalICU 75 | (missing)
|
||||
| messageformat2_data_model.h | UnsupportedStatement& icu::message2::data_model::UnsupportedStatement::operator=(UnsupportedStatement) | InternalICU 75 | (missing)
|
||||
| messageformat2_data_model.h | bool icu::message2::data_model::Expression::isReserved() const | InternalICU 75 | (missing)
|
||||
| messageformat2_data_model.h | const Literal& icu::message2::data_model::Reserved::getPart(int32_t) const | InternalICU 75 | (missing)
|
||||
| messageformat2_data_model.h | const Reserved* icu::message2::data_model::UnsupportedStatement::getBody(UErrorCode&) const | InternalICU 75 | (missing)
|
||||
| messageformat2_data_model.h | const UnicodeString & icu::message2::data_model::UnsupportedStatement::getKeyword() const | InternalICU 75 | (missing)
|
||||
| messageformat2_data_model.h | icu::message2::data_model::Reserved::Builder::Builder(Builder&&)=delete | _untagged _ | (missing)
|
||||
| messageformat2_data_model.h | icu::message2::data_model::Reserved::Builder::Builder(UErrorCode&) | InternalICU 75 | (missing)
|
||||
| messageformat2_data_model.h | icu::message2::data_model::Reserved::Builder::Builder(const Builder&)=delete | _untagged _ | (missing)
|
||||
| messageformat2_data_model.h | icu::message2::data_model::Reserved::Builder::~Builder() | InternalICU 75 | (missing)
|
||||
| messageformat2_data_model.h | icu::message2::data_model::Reserved::Reserved() | InternalICU 75 | (missing)
|
||||
| messageformat2_data_model.h | icu::message2::data_model::Reserved::Reserved(const Reserved&) | InternalICU 75 | (missing)
|
||||
| messageformat2_data_model.h | icu::message2::data_model::Reserved::~Reserved() | InternalICU 75 | (missing)
|
||||
| messageformat2_data_model.h | icu::message2::data_model::UnsupportedStatement::Builder::Builder(Builder&&)=delete | _untagged _ | (missing)
|
||||
| messageformat2_data_model.h | icu::message2::data_model::UnsupportedStatement::Builder::Builder(UErrorCode&) | InternalICU 75 | (missing)
|
||||
| messageformat2_data_model.h | icu::message2::data_model::UnsupportedStatement::Builder::Builder(const Builder&)=delete | _untagged _ | (missing)
|
||||
| messageformat2_data_model.h | icu::message2::data_model::UnsupportedStatement::Builder::~Builder() | InternalICU 75 | (missing)
|
||||
| messageformat2_data_model.h | icu::message2::data_model::UnsupportedStatement::UnsupportedStatement() | InternalICU 75 | (missing)
|
||||
| messageformat2_data_model.h | icu::message2::data_model::UnsupportedStatement::UnsupportedStatement(const UnsupportedStatement&) | InternalICU 75 | (missing)
|
||||
| messageformat2_data_model.h | icu::message2::data_model::UnsupportedStatement::~UnsupportedStatement() | InternalICU 75 | (missing)
|
||||
| messageformat2_data_model.h | int32_t icu::message2::data_model::Reserved::numParts() const | InternalICU 75 | (missing)
|
||||
| messageformat2_data_model.h | std::vector< Expression > icu::message2::data_model::UnsupportedStatement::getExpressions() const | InternalICU 75 | (missing)
|
||||
| simplenumberformatter.h | void icu::number::SimpleNumber::truncateStart(uint32_t, UErrorCode&) | DeprecatedICU 75 | (missing)
|
||||
| unistr.h | UNISTR_FROM_STRING_EXPLICIT icu::UnicodeString::UnicodeString(const char16_t*) | StableICU 2.0 | (missing)
|
||||
| unistr.h | UNISTR_FROM_STRING_EXPLICIT icu::UnicodeString::UnicodeString(const uint16_t*) | StableICU 59 | (missing)
|
||||
| unistr.h | UNISTR_FROM_STRING_EXPLICIT icu::UnicodeString::UnicodeString(const wchar_t*) | StableICU 59 | (missing)
|
||||
| unistr.h | UnicodeString& icu::UnicodeString::remove(int32_t, int32_t length=(int32_t)) | StableICU 2.0 | (missing)
|
||||
| unistr.h | UnicodeString& icu::UnicodeString::removeBetween(int32_t, int32_t limit=(int32_t)) | StableICU 2.0 | (missing)
|
||||
| usimplenumberformatter.h | void usnum_truncateStart(USimpleNumber*, int32_t, UErrorCode*) | DeprecatedICU 75 | (missing)
|
||||
| utypes.h | <tt>enum</tt> UErrorCode::U_MF_UNSUPPORTED_EXPRESSION_ERROR | InternalICU 75 | (missing)
|
||||
| utypes.h | <tt>enum</tt> UErrorCode::U_MF_UNSUPPORTED_STATEMENT_ERROR | InternalICU 75 | (missing)
|
||||
| messageformat2_data_model.h | Builder& icu::message2::MFDataModel::Builder::addSelector(Expression&&, UErrorCode&) | InternalICU 75 | (missing)
|
||||
| resbund.h | const Locale icu::ResourceBundle::getLocale(ULocDataLocaleType, UErrorCode&) const | StableICU 2.8 | (missing)
|
||||
| timezone.h | <tt>static</tt> const UnicodeString icu::TimeZone::getEquivalentID(const UnicodeString&, int32_t) | StableICU 2.0 | (missing)
|
||||
| uset.h | UnicodeString U_HEADER_ONLY_NAMESPACE::USetElementIterator::operator* () const | DraftICU 76 | (missing)
|
||||
|
||||
## Deprecated
|
||||
|
||||
Deprecated or Obsoleted in ICU 76
|
||||
Deprecated or Obsoleted in ICU 77
|
||||
|
||||
| File | API | ICU 75 | ICU 76 |
|
||||
| File | API | ICU 76 | ICU 77 |
|
||||
|---|---|---|---|
|
||||
|
||||
## Changed
|
||||
|
||||
Changed in ICU 76 (old, new)
|
||||
Changed in ICU 77 (old, new)
|
||||
|
||||
|
||||
|
||||
| File | API | ICU 75 | ICU 76 |
|
||||
| File | API | ICU 76 | ICU 77 |
|
||||
|---|---|---|---|
|
||||
| measunit.h | <tt>static</tt> MeasureUnit icu::MeasureUnit::getGasolineEnergyDensity() | Draft→StableICU 74
|
||||
| measunit.h | <tt>static</tt> MeasureUnit* icu::MeasureUnit::createGasolineEnergyDensity(UErrorCode&) | Draft→StableICU 74
|
||||
| measure.h | bool icu::Measure::operator!=(const UObject&) const | Draft→StableICU 74
|
||||
| normalizer2.h | <tt>static</tt> const Normalizer2* icu::Normalizer2::getNFKCSimpleCasefoldInstance(UErrorCode&) | Draft→StableICU 74
|
||||
| timezone.h | <tt>static</tt> UnicodeString& icu::TimeZone::getIanaID(const UnicodeString&, UnicodeString&, UErrorCode&) | Draft→StableICU 74
|
||||
| ucal.h | int32_t ucal_getIanaTimeZoneID(const UChar*, int32_t, UChar*, int32_t, UErrorCode*) | Draft→StableICU 74
|
||||
| uchar.h | <tt>enum</tt> UProperty::UCHAR_IDS_UNARY_OPERATOR | Draft→StableICU 74
|
||||
| uchar.h | <tt>enum</tt> UProperty::UCHAR_ID_COMPAT_MATH_CONTINUE | Draft→StableICU 74
|
||||
| uchar.h | <tt>enum</tt> UProperty::UCHAR_ID_COMPAT_MATH_START | Draft→StableICU 74
|
||||
| ulocale.h | UEnumeration* ulocale_getKeywords(const ULocale*, UErrorCode*) | Draft→StableICU 74
|
||||
| ulocale.h | UEnumeration* ulocale_getUnicodeKeywords(const ULocale*, UErrorCode*) | Draft→StableICU 74
|
||||
| ulocale.h | ULocale* ulocale_openForLanguageTag(const char*, int32_t, UErrorCode*) | Draft→StableICU 74
|
||||
| ulocale.h | ULocale* ulocale_openForLocaleID(const char*, int32_t, UErrorCode*) | Draft→StableICU 74
|
||||
| ulocale.h | bool ulocale_isBogus(const ULocale*) | Draft→StableICU 74
|
||||
| ulocale.h | const char* ulocale_getBaseName(const ULocale*) | Draft→StableICU 74
|
||||
| ulocale.h | const char* ulocale_getLanguage(const ULocale*) | Draft→StableICU 74
|
||||
| ulocale.h | const char* ulocale_getLocaleID(const ULocale*) | Draft→StableICU 74
|
||||
| ulocale.h | const char* ulocale_getRegion(const ULocale*) | Draft→StableICU 74
|
||||
| ulocale.h | const char* ulocale_getScript(const ULocale*) | Draft→StableICU 74
|
||||
| ulocale.h | const char* ulocale_getVariant(const ULocale*) | Draft→StableICU 74
|
||||
| ulocale.h | int32_t ulocale_getKeywordValue(const ULocale*, const char*, int32_t, char*, int32_t, UErrorCode*) | Draft→StableICU 74
|
||||
| ulocale.h | int32_t ulocale_getUnicodeKeywordValue(const ULocale*, const char*, int32_t, char*, int32_t, UErrorCode*) | Draft→StableICU 74
|
||||
| ulocale.h | void ulocale_close(ULocale*) | Draft→StableICU 74
|
||||
| ulocbuilder.h | ULocale* ulocbld_buildULocale(ULocaleBuilder*, UErrorCode*) | Draft→StableICU 74
|
||||
| ulocbuilder.h | ULocaleBuilder* ulocbld_open() | Draft→StableICU 74
|
||||
| ulocbuilder.h | bool ulocbld_copyErrorTo(const ULocaleBuilder*, UErrorCode*) | Draft→StableICU 74
|
||||
| ulocbuilder.h | int32_t ulocbld_buildLanguageTag(ULocaleBuilder*, char*, int32_t, UErrorCode*) | Draft→StableICU 74
|
||||
| ulocbuilder.h | int32_t ulocbld_buildLocaleID(ULocaleBuilder*, char*, int32_t, UErrorCode*) | Draft→StableICU 74
|
||||
| ulocbuilder.h | void ulocbld_addUnicodeLocaleAttribute(ULocaleBuilder*, const char*, int32_t) | Draft→StableICU 74
|
||||
| ulocbuilder.h | void ulocbld_adoptULocale(ULocaleBuilder*, ULocale*) | Draft→StableICU 74
|
||||
| ulocbuilder.h | void ulocbld_clear(ULocaleBuilder*) | Draft→StableICU 74
|
||||
| ulocbuilder.h | void ulocbld_clearExtensions(ULocaleBuilder*) | Draft→StableICU 74
|
||||
| ulocbuilder.h | void ulocbld_close(ULocaleBuilder*) | Draft→StableICU 74
|
||||
| ulocbuilder.h | void ulocbld_removeUnicodeLocaleAttribute(ULocaleBuilder*, const char*, int32_t) | Draft→StableICU 74
|
||||
| ulocbuilder.h | void ulocbld_setExtension(ULocaleBuilder*, char, const char*, int32_t) | Draft→StableICU 74
|
||||
| ulocbuilder.h | void ulocbld_setLanguage(ULocaleBuilder*, const char*, int32_t) | Draft→StableICU 74
|
||||
| ulocbuilder.h | void ulocbld_setLanguageTag(ULocaleBuilder*, const char*, int32_t) | Draft→StableICU 74
|
||||
| ulocbuilder.h | void ulocbld_setLocale(ULocaleBuilder*, const char*, int32_t) | Draft→StableICU 74
|
||||
| ulocbuilder.h | void ulocbld_setRegion(ULocaleBuilder*, const char*, int32_t) | Draft→StableICU 74
|
||||
| ulocbuilder.h | void ulocbld_setScript(ULocaleBuilder*, const char*, int32_t) | Draft→StableICU 74
|
||||
| ulocbuilder.h | void ulocbld_setUnicodeLocaleKeyword(ULocaleBuilder*, const char*, int32_t, const char*, int32_t) | Draft→StableICU 74
|
||||
| ulocbuilder.h | void ulocbld_setVariant(ULocaleBuilder*, const char*, int32_t) | Draft→StableICU 74
|
||||
| unorm2.h | const UNormalizer2* unorm2_getNFKCSimpleCasefoldInstance(UErrorCode*) | Draft→StableICU 74
|
||||
| uspoof.h | icu::UnicodeString& uspoof_getBidiSkeletonUnicodeString(const USpoofChecker*, UBiDiDirection, const icu::UnicodeString&, icu::UnicodeString&, UErrorCode*) | Draft→StableICU 74
|
||||
| uspoof.h | int32_t uspoof_getBidiSkeleton(const USpoofChecker*, UBiDiDirection, const UChar*, int32_t, UChar*, int32_t, UErrorCode*) | Draft→StableICU 74
|
||||
| uspoof.h | int32_t uspoof_getBidiSkeletonUTF8(const USpoofChecker*, UBiDiDirection, const char*, int32_t, char*, int32_t, UErrorCode*) | Draft→StableICU 74
|
||||
| uspoof.h | uint32_t uspoof_areBidiConfusable(const USpoofChecker*, UBiDiDirection, const UChar*, int32_t, const UChar*, int32_t, UErrorCode*) | Draft→StableICU 74
|
||||
| uspoof.h | uint32_t uspoof_areBidiConfusableUTF8(const USpoofChecker*, UBiDiDirection, const char*, int32_t, const char*, int32_t, UErrorCode*) | Draft→StableICU 74
|
||||
| uspoof.h | uint32_t uspoof_areBidiConfusableUnicodeString(const USpoofChecker*, UBiDiDirection, const icu::UnicodeString&, const icu::UnicodeString&, UErrorCode*) | Draft→StableICU 74
|
||||
| numberformatter.h | UnlocalizedNumberFormatter icu::number::LocalizedNumberFormatter::withoutLocale() && | Draft→StableICU 75
|
||||
| numberformatter.h | UnlocalizedNumberFormatter icu::number::LocalizedNumberFormatter::withoutLocale() const & | Draft→StableICU 75
|
||||
| numberrangeformatter.h | UnlocalizedNumberRangeFormatter icu::number::LocalizedNumberRangeFormatter::withoutLocale() && | Draft→StableICU 75
|
||||
| numberrangeformatter.h | UnlocalizedNumberRangeFormatter icu::number::LocalizedNumberRangeFormatter::withoutLocale() const & | Draft→StableICU 75
|
||||
| simplenumberformatter.h | void icu::number::SimpleNumber::setMaximumIntegerDigits(uint32_t, UErrorCode&) | Draft→StableICU 75
|
||||
| uchar.h | bool u_hasIDType(UChar32, UIdentifierType) | Draft→StableICU 75
|
||||
| uchar.h | <tt>enum</tt> UIdentifierStatus::U_ID_STATUS_ALLOWED | Draft→StableICU 75
|
||||
| uchar.h | <tt>enum</tt> UIdentifierStatus::U_ID_STATUS_RESTRICTED | Draft→StableICU 75
|
||||
| uchar.h | <tt>enum</tt> UIdentifierType::U_ID_TYPE_DEFAULT_IGNORABLE | Draft→StableICU 75
|
||||
| uchar.h | <tt>enum</tt> UIdentifierType::U_ID_TYPE_DEPRECATED | Draft→StableICU 75
|
||||
| uchar.h | <tt>enum</tt> UIdentifierType::U_ID_TYPE_EXCLUSION | Draft→StableICU 75
|
||||
| uchar.h | <tt>enum</tt> UIdentifierType::U_ID_TYPE_INCLUSION | Draft→StableICU 75
|
||||
| uchar.h | <tt>enum</tt> UIdentifierType::U_ID_TYPE_LIMITED_USE | Draft→StableICU 75
|
||||
| uchar.h | <tt>enum</tt> UIdentifierType::U_ID_TYPE_NOT_CHARACTER | Draft→StableICU 75
|
||||
| uchar.h | <tt>enum</tt> UIdentifierType::U_ID_TYPE_NOT_NFKC | Draft→StableICU 75
|
||||
| uchar.h | <tt>enum</tt> UIdentifierType::U_ID_TYPE_NOT_XID | Draft→StableICU 75
|
||||
| uchar.h | <tt>enum</tt> UIdentifierType::U_ID_TYPE_OBSOLETE | Draft→StableICU 75
|
||||
| uchar.h | <tt>enum</tt> UIdentifierType::U_ID_TYPE_RECOMMENDED | Draft→StableICU 75
|
||||
| uchar.h | <tt>enum</tt> UIdentifierType::U_ID_TYPE_TECHNICAL | Draft→StableICU 75
|
||||
| uchar.h | <tt>enum</tt> UIdentifierType::U_ID_TYPE_UNCOMMON_USE | Draft→StableICU 75
|
||||
| uchar.h | <tt>enum</tt> UProperty::UCHAR_IDENTIFIER_STATUS | Draft→StableICU 75
|
||||
| uchar.h | <tt>enum</tt> UProperty::UCHAR_IDENTIFIER_TYPE | Draft→StableICU 75
|
||||
| uchar.h | int32_t u_getIDTypes(UChar32, UIdentifierType*, int32_t, UErrorCode*) | Draft→StableICU 75
|
||||
| uniset.h | U_HEADER_NESTED_NAMESPACE::USetElementIterator icu::UnicodeSet::begin() const | DraftICU 76 | DraftICU 77
|
||||
| uniset.h | U_HEADER_NESTED_NAMESPACE::USetElementIterator icu::UnicodeSet::end() const | DraftICU 76 | DraftICU 77
|
||||
| uset.h | USetElementIterator & U_HEADER_ONLY_NAMESPACE::USetElementIterator::operator++() | DraftICU 76 | DraftICU 77
|
||||
| uset.h | USetElementIterator U_HEADER_ONLY_NAMESPACE::USetElementIterator::operator++(int) | DraftICU 76 | DraftICU 77
|
||||
| uset.h | USetElementIterator U_HEADER_ONLY_NAMESPACE::USetElements::begin() const | DraftICU 76 | DraftICU 77
|
||||
| uset.h | USetElementIterator U_HEADER_ONLY_NAMESPACE::USetElements::end() const | DraftICU 76 | DraftICU 77
|
||||
| uset.h | U_HEADER_ONLY_NAMESPACE::USetElementIterator::USetElementIterator(const USetElementIterator&)=default | DraftICU 76 | DraftICU 77
|
||||
| uset.h | U_HEADER_ONLY_NAMESPACE::USetElements::USetElements(const USet*) | DraftICU 76 | DraftICU 77
|
||||
| uset.h | U_HEADER_ONLY_NAMESPACE::USetElements::USetElements(const USetElements&)=default | DraftICU 76 | DraftICU 77
|
||||
| uset.h | bool U_HEADER_ONLY_NAMESPACE::USetElementIterator::operator!=(const USetElementIterator&) const | DraftICU 76 | DraftICU 77
|
||||
| uset.h | bool U_HEADER_ONLY_NAMESPACE::USetElementIterator::operator==(const USetElementIterator&) const | DraftICU 76 | DraftICU 77
|
||||
| usimplenumberformatter.h | void usnum_setMaximumIntegerDigits(USimpleNumber*, int32_t, UErrorCode*) | Draft→StableICU 75
|
||||
|
||||
## Promoted
|
||||
|
||||
Promoted to stable in ICU 76
|
||||
Promoted to stable in ICU 77
|
||||
|
||||
| File | API | ICU 75 | ICU 76 |
|
||||
| File | API | ICU 76 | ICU 77 |
|
||||
|---|---|---|---|
|
||||
| measunit.h | <tt>static</tt> MeasureUnit icu::MeasureUnit::getGasolineEnergyDensity() | Draft→StableICU 74
|
||||
| measunit.h | <tt>static</tt> MeasureUnit* icu::MeasureUnit::createGasolineEnergyDensity(UErrorCode&) | Draft→StableICU 74
|
||||
| measure.h | bool icu::Measure::operator!=(const UObject&) const | Draft→StableICU 74
|
||||
| normalizer2.h | <tt>static</tt> const Normalizer2* icu::Normalizer2::getNFKCSimpleCasefoldInstance(UErrorCode&) | Draft→StableICU 74
|
||||
| timezone.h | <tt>static</tt> UnicodeString& icu::TimeZone::getIanaID(const UnicodeString&, UnicodeString&, UErrorCode&) | Draft→StableICU 74
|
||||
| ucal.h | int32_t ucal_getIanaTimeZoneID(const UChar*, int32_t, UChar*, int32_t, UErrorCode*) | Draft→StableICU 74
|
||||
| uchar.h | <tt>enum</tt> UBlockCode::UBLOCK_EGYPTIAN_HIEROGLYPHS_EXTENDED_A | (missing) | StableICU 76| *(Born Stable)* |
|
||||
| uchar.h | <tt>enum</tt> UBlockCode::UBLOCK_GARAY | (missing) | StableICU 76| *(Born Stable)* |
|
||||
| uchar.h | <tt>enum</tt> UBlockCode::UBLOCK_GURUNG_KHEMA | (missing) | StableICU 76| *(Born Stable)* |
|
||||
| uchar.h | <tt>enum</tt> UBlockCode::UBLOCK_KIRAT_RAI | (missing) | StableICU 76| *(Born Stable)* |
|
||||
| uchar.h | <tt>enum</tt> UBlockCode::UBLOCK_MYANMAR_EXTENDED_C | (missing) | StableICU 76| *(Born Stable)* |
|
||||
| uchar.h | <tt>enum</tt> UBlockCode::UBLOCK_OL_ONAL | (missing) | StableICU 76| *(Born Stable)* |
|
||||
| uchar.h | <tt>enum</tt> UBlockCode::UBLOCK_SUNUWAR | (missing) | StableICU 76| *(Born Stable)* |
|
||||
| uchar.h | <tt>enum</tt> UBlockCode::UBLOCK_SYMBOLS_FOR_LEGACY_COMPUTING_SUPPLEMENT | (missing) | StableICU 76| *(Born Stable)* |
|
||||
| uchar.h | <tt>enum</tt> UBlockCode::UBLOCK_TODHRI | (missing) | StableICU 76| *(Born Stable)* |
|
||||
| uchar.h | <tt>enum</tt> UBlockCode::UBLOCK_TULU_TIGALARI | (missing) | StableICU 76| *(Born Stable)* |
|
||||
| uchar.h | <tt>enum</tt> UIndicSyllabicCategory::U_INSC_REORDERING_KILLER | (missing) | StableICU 76| *(Born Stable)* |
|
||||
| uchar.h | <tt>enum</tt> UJoiningGroup::U_JG_KASHMIRI_YEH | (missing) | StableICU 76| *(Born Stable)* |
|
||||
| uchar.h | <tt>enum</tt> UProperty::UCHAR_IDS_UNARY_OPERATOR | Draft→StableICU 74
|
||||
| uchar.h | <tt>enum</tt> UProperty::UCHAR_ID_COMPAT_MATH_CONTINUE | Draft→StableICU 74
|
||||
| uchar.h | <tt>enum</tt> UProperty::UCHAR_ID_COMPAT_MATH_START | Draft→StableICU 74
|
||||
| ulocale.h | UEnumeration* ulocale_getKeywords(const ULocale*, UErrorCode*) | Draft→StableICU 74
|
||||
| ulocale.h | UEnumeration* ulocale_getUnicodeKeywords(const ULocale*, UErrorCode*) | Draft→StableICU 74
|
||||
| ulocale.h | ULocale* ulocale_openForLanguageTag(const char*, int32_t, UErrorCode*) | Draft→StableICU 74
|
||||
| ulocale.h | ULocale* ulocale_openForLocaleID(const char*, int32_t, UErrorCode*) | Draft→StableICU 74
|
||||
| ulocale.h | bool ulocale_isBogus(const ULocale*) | Draft→StableICU 74
|
||||
| ulocale.h | const char* ulocale_getBaseName(const ULocale*) | Draft→StableICU 74
|
||||
| ulocale.h | const char* ulocale_getLanguage(const ULocale*) | Draft→StableICU 74
|
||||
| ulocale.h | const char* ulocale_getLocaleID(const ULocale*) | Draft→StableICU 74
|
||||
| ulocale.h | const char* ulocale_getRegion(const ULocale*) | Draft→StableICU 74
|
||||
| ulocale.h | const char* ulocale_getScript(const ULocale*) | Draft→StableICU 74
|
||||
| ulocale.h | const char* ulocale_getVariant(const ULocale*) | Draft→StableICU 74
|
||||
| ulocale.h | int32_t ulocale_getKeywordValue(const ULocale*, const char*, int32_t, char*, int32_t, UErrorCode*) | Draft→StableICU 74
|
||||
| ulocale.h | int32_t ulocale_getUnicodeKeywordValue(const ULocale*, const char*, int32_t, char*, int32_t, UErrorCode*) | Draft→StableICU 74
|
||||
| ulocale.h | void ulocale_close(ULocale*) | Draft→StableICU 74
|
||||
| ulocbuilder.h | ULocale* ulocbld_buildULocale(ULocaleBuilder*, UErrorCode*) | Draft→StableICU 74
|
||||
| ulocbuilder.h | ULocaleBuilder* ulocbld_open() | Draft→StableICU 74
|
||||
| ulocbuilder.h | bool ulocbld_copyErrorTo(const ULocaleBuilder*, UErrorCode*) | Draft→StableICU 74
|
||||
| ulocbuilder.h | int32_t ulocbld_buildLanguageTag(ULocaleBuilder*, char*, int32_t, UErrorCode*) | Draft→StableICU 74
|
||||
| ulocbuilder.h | int32_t ulocbld_buildLocaleID(ULocaleBuilder*, char*, int32_t, UErrorCode*) | Draft→StableICU 74
|
||||
| ulocbuilder.h | void ulocbld_addUnicodeLocaleAttribute(ULocaleBuilder*, const char*, int32_t) | Draft→StableICU 74
|
||||
| ulocbuilder.h | void ulocbld_adoptULocale(ULocaleBuilder*, ULocale*) | Draft→StableICU 74
|
||||
| ulocbuilder.h | void ulocbld_clear(ULocaleBuilder*) | Draft→StableICU 74
|
||||
| ulocbuilder.h | void ulocbld_clearExtensions(ULocaleBuilder*) | Draft→StableICU 74
|
||||
| ulocbuilder.h | void ulocbld_close(ULocaleBuilder*) | Draft→StableICU 74
|
||||
| ulocbuilder.h | void ulocbld_removeUnicodeLocaleAttribute(ULocaleBuilder*, const char*, int32_t) | Draft→StableICU 74
|
||||
| ulocbuilder.h | void ulocbld_setExtension(ULocaleBuilder*, char, const char*, int32_t) | Draft→StableICU 74
|
||||
| ulocbuilder.h | void ulocbld_setLanguage(ULocaleBuilder*, const char*, int32_t) | Draft→StableICU 74
|
||||
| ulocbuilder.h | void ulocbld_setLanguageTag(ULocaleBuilder*, const char*, int32_t) | Draft→StableICU 74
|
||||
| ulocbuilder.h | void ulocbld_setLocale(ULocaleBuilder*, const char*, int32_t) | Draft→StableICU 74
|
||||
| ulocbuilder.h | void ulocbld_setRegion(ULocaleBuilder*, const char*, int32_t) | Draft→StableICU 74
|
||||
| ulocbuilder.h | void ulocbld_setScript(ULocaleBuilder*, const char*, int32_t) | Draft→StableICU 74
|
||||
| ulocbuilder.h | void ulocbld_setUnicodeLocaleKeyword(ULocaleBuilder*, const char*, int32_t, const char*, int32_t) | Draft→StableICU 74
|
||||
| ulocbuilder.h | void ulocbld_setVariant(ULocaleBuilder*, const char*, int32_t) | Draft→StableICU 74
|
||||
| unistr.h | UnicodeString& icu::UnicodeString::remove(int32_t, int32_t length=static_cast< int32_t >(INT32_MAX)) | (missing) | StableICU 2.0
|
||||
| unistr.h | UnicodeString& icu::UnicodeString::removeBetween(int32_t, int32_t limit=static_cast< int32_t >(INT32_MAX)) | (missing) | StableICU 2.0
|
||||
| unorm2.h | const UNormalizer2* unorm2_getNFKCSimpleCasefoldInstance(UErrorCode*) | Draft→StableICU 74
|
||||
| uscript.h | <tt>enum</tt> UScriptCode::USCRIPT_GARAY | (missing) | StableICU 76| *(Born Stable)* |
|
||||
| uscript.h | <tt>enum</tt> UScriptCode::USCRIPT_GURUNG_KHEMA | (missing) | StableICU 76| *(Born Stable)* |
|
||||
| uscript.h | <tt>enum</tt> UScriptCode::USCRIPT_KIRAT_RAI | (missing) | StableICU 76| *(Born Stable)* |
|
||||
| uscript.h | <tt>enum</tt> UScriptCode::USCRIPT_OL_ONAL | (missing) | StableICU 76| *(Born Stable)* |
|
||||
| uscript.h | <tt>enum</tt> UScriptCode::USCRIPT_SUNUWAR | (missing) | StableICU 76| *(Born Stable)* |
|
||||
| uscript.h | <tt>enum</tt> UScriptCode::USCRIPT_TODHRI | (missing) | StableICU 76| *(Born Stable)* |
|
||||
| uscript.h | <tt>enum</tt> UScriptCode::USCRIPT_TULU_TIGALARI | (missing) | StableICU 76| *(Born Stable)* |
|
||||
| uspoof.h | icu::UnicodeString& uspoof_getBidiSkeletonUnicodeString(const USpoofChecker*, UBiDiDirection, const icu::UnicodeString&, icu::UnicodeString&, UErrorCode*) | Draft→StableICU 74
|
||||
| uspoof.h | int32_t uspoof_getBidiSkeleton(const USpoofChecker*, UBiDiDirection, const UChar*, int32_t, UChar*, int32_t, UErrorCode*) | Draft→StableICU 74
|
||||
| uspoof.h | int32_t uspoof_getBidiSkeletonUTF8(const USpoofChecker*, UBiDiDirection, const char*, int32_t, char*, int32_t, UErrorCode*) | Draft→StableICU 74
|
||||
| uspoof.h | uint32_t uspoof_areBidiConfusable(const USpoofChecker*, UBiDiDirection, const UChar*, int32_t, const UChar*, int32_t, UErrorCode*) | Draft→StableICU 74
|
||||
| uspoof.h | uint32_t uspoof_areBidiConfusableUTF8(const USpoofChecker*, UBiDiDirection, const char*, int32_t, const char*, int32_t, UErrorCode*) | Draft→StableICU 74
|
||||
| uspoof.h | uint32_t uspoof_areBidiConfusableUnicodeString(const USpoofChecker*, UBiDiDirection, const icu::UnicodeString&, const icu::UnicodeString&, UErrorCode*) | Draft→StableICU 74
|
||||
| numberformatter.h | UnlocalizedNumberFormatter icu::number::LocalizedNumberFormatter::withoutLocale() && | Draft→StableICU 75
|
||||
| numberformatter.h | UnlocalizedNumberFormatter icu::number::LocalizedNumberFormatter::withoutLocale() const & | Draft→StableICU 75
|
||||
| numberrangeformatter.h | UnlocalizedNumberRangeFormatter icu::number::LocalizedNumberRangeFormatter::withoutLocale() && | Draft→StableICU 75
|
||||
| numberrangeformatter.h | UnlocalizedNumberRangeFormatter icu::number::LocalizedNumberRangeFormatter::withoutLocale() const & | Draft→StableICU 75
|
||||
| resbund.h | Locale icu::ResourceBundle::getLocale(ULocDataLocaleType, UErrorCode&) const | (missing) | StableICU 2.8
|
||||
| simplenumberformatter.h | void icu::number::SimpleNumber::setMaximumIntegerDigits(uint32_t, UErrorCode&) | Draft→StableICU 75
|
||||
| timezone.h | <tt>static</tt> UnicodeString icu::TimeZone::getEquivalentID(const UnicodeString&, int32_t) | (missing) | StableICU 2.0
|
||||
| uchar.h | bool u_hasIDType(UChar32, UIdentifierType) | Draft→StableICU 75
|
||||
| uchar.h | <tt>enum</tt> UIdentifierStatus::U_ID_STATUS_ALLOWED | Draft→StableICU 75
|
||||
| uchar.h | <tt>enum</tt> UIdentifierStatus::U_ID_STATUS_RESTRICTED | Draft→StableICU 75
|
||||
| uchar.h | <tt>enum</tt> UIdentifierType::U_ID_TYPE_DEFAULT_IGNORABLE | Draft→StableICU 75
|
||||
| uchar.h | <tt>enum</tt> UIdentifierType::U_ID_TYPE_DEPRECATED | Draft→StableICU 75
|
||||
| uchar.h | <tt>enum</tt> UIdentifierType::U_ID_TYPE_EXCLUSION | Draft→StableICU 75
|
||||
| uchar.h | <tt>enum</tt> UIdentifierType::U_ID_TYPE_INCLUSION | Draft→StableICU 75
|
||||
| uchar.h | <tt>enum</tt> UIdentifierType::U_ID_TYPE_LIMITED_USE | Draft→StableICU 75
|
||||
| uchar.h | <tt>enum</tt> UIdentifierType::U_ID_TYPE_NOT_CHARACTER | Draft→StableICU 75
|
||||
| uchar.h | <tt>enum</tt> UIdentifierType::U_ID_TYPE_NOT_NFKC | Draft→StableICU 75
|
||||
| uchar.h | <tt>enum</tt> UIdentifierType::U_ID_TYPE_NOT_XID | Draft→StableICU 75
|
||||
| uchar.h | <tt>enum</tt> UIdentifierType::U_ID_TYPE_OBSOLETE | Draft→StableICU 75
|
||||
| uchar.h | <tt>enum</tt> UIdentifierType::U_ID_TYPE_RECOMMENDED | Draft→StableICU 75
|
||||
| uchar.h | <tt>enum</tt> UIdentifierType::U_ID_TYPE_TECHNICAL | Draft→StableICU 75
|
||||
| uchar.h | <tt>enum</tt> UIdentifierType::U_ID_TYPE_UNCOMMON_USE | Draft→StableICU 75
|
||||
| uchar.h | <tt>enum</tt> UProperty::UCHAR_IDENTIFIER_STATUS | Draft→StableICU 75
|
||||
| uchar.h | <tt>enum</tt> UProperty::UCHAR_IDENTIFIER_TYPE | Draft→StableICU 75
|
||||
| uchar.h | int32_t u_getIDTypes(UChar32, UIdentifierType*, int32_t, UErrorCode*) | Draft→StableICU 75
|
||||
| usimplenumberformatter.h | void usnum_setMaximumIntegerDigits(USimpleNumber*, int32_t, UErrorCode*) | Draft→StableICU 75
|
||||
|
||||
## Added
|
||||
|
||||
Added in ICU 76
|
||||
Added in ICU 77
|
||||
|
||||
| File | API | ICU 75 | ICU 76 |
|
||||
| File | API | ICU 76 | ICU 77 |
|
||||
|---|---|---|---|
|
||||
| coll.h | auto icu::Collator::equal_to() const | (missing) | DraftICU 76
|
||||
| coll.h | auto icu::Collator::greater() const | (missing) | DraftICU 76
|
||||
| coll.h | auto icu::Collator::greater_equal() const | (missing) | DraftICU 76
|
||||
| coll.h | auto icu::Collator::less() const | (missing) | DraftICU 76
|
||||
| coll.h | auto icu::Collator::less_equal() const | (missing) | DraftICU 76
|
||||
| coll.h | auto icu::Collator::not_equal_to() const | (missing) | DraftICU 76
|
||||
| messageformat2.h | Builder& icu::message2::MessageFormatter::Builder::setErrorHandlingBehavior(UMFErrorHandlingBehavior) | (missing) | InternalICU 76
|
||||
| messageformat2.h | <tt>enum</tt> icu::message2::MessageFormatter::UMFErrorHandlingBehavior {} | (missing) | InternalICU 76
|
||||
| messageformat2.h | <tt>enum</tt> icu::message2::MessageFormatter::UMFErrorHandlingBehavior::U_MF_BEST_EFFORT | (missing) | InternalICU 76
|
||||
| messageformat2.h | <tt>enum</tt> icu::message2::MessageFormatter::UMFErrorHandlingBehavior::U_MF_STRICT | (missing) | InternalICU 76
|
||||
| stringpiece.h | icu::StringPiece::operator std::string_view() const | (missing) | Internal
|
||||
| uchar.h | <tt>enum</tt> UBlockCode::UBLOCK_EGYPTIAN_HIEROGLYPHS_EXTENDED_A | (missing) | StableICU 76| *(Born Stable)* |
|
||||
| uchar.h | <tt>enum</tt> UBlockCode::UBLOCK_GARAY | (missing) | StableICU 76| *(Born Stable)* |
|
||||
| uchar.h | <tt>enum</tt> UBlockCode::UBLOCK_GURUNG_KHEMA | (missing) | StableICU 76| *(Born Stable)* |
|
||||
| uchar.h | <tt>enum</tt> UBlockCode::UBLOCK_KIRAT_RAI | (missing) | StableICU 76| *(Born Stable)* |
|
||||
| uchar.h | <tt>enum</tt> UBlockCode::UBLOCK_MYANMAR_EXTENDED_C | (missing) | StableICU 76| *(Born Stable)* |
|
||||
| uchar.h | <tt>enum</tt> UBlockCode::UBLOCK_OL_ONAL | (missing) | StableICU 76| *(Born Stable)* |
|
||||
| uchar.h | <tt>enum</tt> UBlockCode::UBLOCK_SUNUWAR | (missing) | StableICU 76| *(Born Stable)* |
|
||||
| uchar.h | <tt>enum</tt> UBlockCode::UBLOCK_SYMBOLS_FOR_LEGACY_COMPUTING_SUPPLEMENT | (missing) | StableICU 76| *(Born Stable)* |
|
||||
| uchar.h | <tt>enum</tt> UBlockCode::UBLOCK_TODHRI | (missing) | StableICU 76| *(Born Stable)* |
|
||||
| uchar.h | <tt>enum</tt> UBlockCode::UBLOCK_TULU_TIGALARI | (missing) | StableICU 76| *(Born Stable)* |
|
||||
| uchar.h | <tt>enum</tt> UIndicConjunctBreak::U_INCB_CONSONANT | (missing) | DraftICU 76
|
||||
| uchar.h | <tt>enum</tt> UIndicConjunctBreak::U_INCB_EXTEND | (missing) | DraftICU 76
|
||||
| uchar.h | <tt>enum</tt> UIndicConjunctBreak::U_INCB_LINKER | (missing) | DraftICU 76
|
||||
| uchar.h | <tt>enum</tt> UIndicConjunctBreak::U_INCB_NONE | (missing) | DraftICU 76
|
||||
| uchar.h | <tt>enum</tt> UIndicSyllabicCategory::U_INSC_REORDERING_KILLER | (missing) | StableICU 76| *(Born Stable)* |
|
||||
| uchar.h | <tt>enum</tt> UJoiningGroup::U_JG_KASHMIRI_YEH | (missing) | StableICU 76| *(Born Stable)* |
|
||||
| uchar.h | <tt>enum</tt> UProperty::UCHAR_INDIC_CONJUNCT_BREAK | (missing) | DraftICU 76
|
||||
| uchar.h | <tt>enum</tt> UProperty::UCHAR_MODIFIER_COMBINING_MARK | (missing) | DraftICU 76
|
||||
| ucol.h | U_HEADER_ONLY_NAMESPACE::collator::internal::Predicate< Compare, result >::Predicate(const UCollator*) | (missing) | Internal
|
||||
| ucol.h | bool U_HEADER_ONLY_NAMESPACE::collator::internal::Predicate< Compare, result >::operator()(const T&, const U&) const | (missing) | Internal
|
||||
| ucol.h | bool U_HEADER_ONLY_NAMESPACE::collator::internal::Predicate< Compare, result >::operator()(std::string_view, std::string_view) const | (missing) | Internal
|
||||
| uniset.h | U_HEADER_NESTED_NAMESPACE::USetCodePoints icu::UnicodeSet::codePoints() const | (missing) | DraftICU 76
|
||||
| uniset.h | U_HEADER_NESTED_NAMESPACE::USetElementIterator icu::UnicodeSet::begin() const | (missing) | DraftICU 76
|
||||
| uniset.h | U_HEADER_NESTED_NAMESPACE::USetElementIterator icu::UnicodeSet::end() const | (missing) | DraftICU 76
|
||||
| uniset.h | U_HEADER_NESTED_NAMESPACE::USetRanges icu::UnicodeSet::ranges() const | (missing) | DraftICU 76
|
||||
| uniset.h | U_HEADER_NESTED_NAMESPACE::USetStrings icu::UnicodeSet::strings() const | (missing) | DraftICU 76
|
||||
| unistr.h | UNISTR_FROM_STRING_EXPLICIT icu::UnicodeString::UnicodeString(const S&) | (missing) | DraftICU 76
|
||||
| unistr.h | UnicodeString& icu::UnicodeString::append(const S&) | (missing) | DraftICU 76
|
||||
| unistr.h | UnicodeString& icu::UnicodeString::operator+=(const S&) | (missing) | DraftICU 76
|
||||
| unistr.h | UnicodeString& icu::UnicodeString::operator=(const S&) | (missing) | DraftICU 76
|
||||
| unistr.h | UnicodeString& icu::UnicodeString::remove(int32_t, int32_t length=static_cast< int32_t >(INT32_MAX)) | (missing) | StableICU 2.0
|
||||
| unistr.h | UnicodeString& icu::UnicodeString::removeBetween(int32_t, int32_t limit=static_cast< int32_t >(INT32_MAX)) | (missing) | StableICU 2.0
|
||||
| unistr.h | bool icu::UnicodeString::operator!=(const S&) const | (missing) | DraftICU 76
|
||||
| unistr.h | bool icu::UnicodeString::operator==(const S&) const | (missing) | DraftICU 76
|
||||
| unistr.h | icu::UnicodeString::operator std::u16string_view() const | (missing) | DraftICU 76
|
||||
| unistr.h | icu::UnicodeString::operator std::wstring_view() const | (missing) | DraftICU 76
|
||||
| unistr.h | <tt>static</tt> UnicodeString icu::UnicodeString::readOnlyAlias(const S&) | (missing) | DraftICU 76
|
||||
| unistr.h | <tt>static</tt> UnicodeString icu::UnicodeString::readOnlyAlias(const UnicodeString&) | (missing) | DraftICU 76
|
||||
| uscript.h | <tt>enum</tt> UScriptCode::USCRIPT_GARAY | (missing) | StableICU 76| *(Born Stable)* |
|
||||
| uscript.h | <tt>enum</tt> UScriptCode::USCRIPT_GURUNG_KHEMA | (missing) | StableICU 76| *(Born Stable)* |
|
||||
| uscript.h | <tt>enum</tt> UScriptCode::USCRIPT_KIRAT_RAI | (missing) | StableICU 76| *(Born Stable)* |
|
||||
| uscript.h | <tt>enum</tt> UScriptCode::USCRIPT_OL_ONAL | (missing) | StableICU 76| *(Born Stable)* |
|
||||
| uscript.h | <tt>enum</tt> UScriptCode::USCRIPT_SUNUWAR | (missing) | StableICU 76| *(Born Stable)* |
|
||||
| uscript.h | <tt>enum</tt> UScriptCode::USCRIPT_TODHRI | (missing) | StableICU 76| *(Born Stable)* |
|
||||
| uscript.h | <tt>enum</tt> UScriptCode::USCRIPT_TULU_TIGALARI | (missing) | StableICU 76| *(Born Stable)* |
|
||||
| uset.h | CodePointRange U_HEADER_ONLY_NAMESPACE::USetRangeIterator::operator* () const | (missing) | DraftICU 76
|
||||
| uset.h | USetCodePointIterator & U_HEADER_ONLY_NAMESPACE::USetCodePointIterator::operator++() | (missing) | DraftICU 76
|
||||
| uset.h | USetCodePointIterator U_HEADER_ONLY_NAMESPACE::USetCodePointIterator::operator++(int) | (missing) | DraftICU 76
|
||||
| uset.h | USetCodePointIterator U_HEADER_ONLY_NAMESPACE::USetCodePoints::begin() const | (missing) | DraftICU 76
|
||||
| uset.h | USetCodePointIterator U_HEADER_ONLY_NAMESPACE::USetCodePoints::end() const | (missing) | DraftICU 76
|
||||
| uset.h | USetElementIterator & U_HEADER_ONLY_NAMESPACE::USetElementIterator::operator++() | (missing) | DraftICU 76
|
||||
| uset.h | USetElementIterator U_HEADER_ONLY_NAMESPACE::USetElementIterator::operator++(int) | (missing) | DraftICU 76
|
||||
| uset.h | USetElementIterator U_HEADER_ONLY_NAMESPACE::USetElements::begin() const | (missing) | DraftICU 76
|
||||
| uset.h | USetElementIterator U_HEADER_ONLY_NAMESPACE::USetElements::end() const | (missing) | DraftICU 76
|
||||
| uset.h | USetRangeIterator & U_HEADER_ONLY_NAMESPACE::USetRangeIterator::operator++() | (missing) | DraftICU 76
|
||||
| uset.h | USetRangeIterator U_HEADER_ONLY_NAMESPACE::USetRangeIterator::operator++(int) | (missing) | DraftICU 76
|
||||
| uset.h | USetRangeIterator U_HEADER_ONLY_NAMESPACE::USetRanges::begin() const | (missing) | DraftICU 76
|
||||
| uset.h | USetRangeIterator U_HEADER_ONLY_NAMESPACE::USetRanges::end() const | (missing) | DraftICU 76
|
||||
| uset.h | USetStringIterator & U_HEADER_ONLY_NAMESPACE::USetStringIterator::operator++() | (missing) | DraftICU 76
|
||||
| uset.h | USetStringIterator U_HEADER_ONLY_NAMESPACE::USetStringIterator::operator++(int) | (missing) | DraftICU 76
|
||||
| uset.h | USetStringIterator U_HEADER_ONLY_NAMESPACE::USetStrings::begin() const | (missing) | DraftICU 76
|
||||
| uset.h | USetStringIterator U_HEADER_ONLY_NAMESPACE::USetStrings::end() const | (missing) | DraftICU 76
|
||||
| uset.h | U_HEADER_ONLY_NAMESPACE::USetCodePointIterator::USetCodePointIterator(const USetCodePointIterator&)=default | (missing) | DraftICU 76
|
||||
| uset.h | U_HEADER_ONLY_NAMESPACE::USetCodePoints::USetCodePoints(const USet*) | (missing) | DraftICU 76
|
||||
| uset.h | U_HEADER_ONLY_NAMESPACE::USetCodePoints::USetCodePoints(const USetCodePoints&)=default | (missing) | DraftICU 76
|
||||
| uset.h | U_HEADER_ONLY_NAMESPACE::USetElementIterator::USetElementIterator(const USetElementIterator&)=default | (missing) | DraftICU 76
|
||||
| uset.h | U_HEADER_ONLY_NAMESPACE::USetElements::USetElements(const USet*) | (missing) | DraftICU 76
|
||||
| uset.h | U_HEADER_ONLY_NAMESPACE::USetElements::USetElements(const USetElements&)=default | (missing) | DraftICU 76
|
||||
| uset.h | U_HEADER_ONLY_NAMESPACE::USetRangeIterator::USetRangeIterator(const USetRangeIterator&)=default | (missing) | DraftICU 76
|
||||
| uset.h | U_HEADER_ONLY_NAMESPACE::USetRanges::USetRanges(const USet*) | (missing) | DraftICU 76
|
||||
| uset.h | U_HEADER_ONLY_NAMESPACE::USetRanges::USetRanges(const USetRanges&)=default | (missing) | DraftICU 76
|
||||
| uset.h | U_HEADER_ONLY_NAMESPACE::USetStringIterator::USetStringIterator(const USetStringIterator&)=default | (missing) | DraftICU 76
|
||||
| uset.h | U_HEADER_ONLY_NAMESPACE::USetStrings::USetStrings(const USet*) | (missing) | DraftICU 76
|
||||
| uset.h | U_HEADER_ONLY_NAMESPACE::USetStrings::USetStrings(const USetStrings&)=default | (missing) | DraftICU 76
|
||||
| uset.h | UnicodeString U_HEADER_ONLY_NAMESPACE::USetElementIterator::operator* () const | (missing) | DraftICU 76
|
||||
| uset.h | bool U_HEADER_ONLY_NAMESPACE::USetCodePointIterator::operator!=(const USetCodePointIterator&) const | (missing) | DraftICU 76
|
||||
| uset.h | bool U_HEADER_ONLY_NAMESPACE::USetCodePointIterator::operator==(const USetCodePointIterator&) const | (missing) | DraftICU 76
|
||||
| uset.h | bool U_HEADER_ONLY_NAMESPACE::USetElementIterator::operator!=(const USetElementIterator&) const | (missing) | DraftICU 76
|
||||
| uset.h | bool U_HEADER_ONLY_NAMESPACE::USetElementIterator::operator==(const USetElementIterator&) const | (missing) | DraftICU 76
|
||||
| uset.h | bool U_HEADER_ONLY_NAMESPACE::USetRangeIterator::operator!=(const USetRangeIterator&) const | (missing) | DraftICU 76
|
||||
| uset.h | bool U_HEADER_ONLY_NAMESPACE::USetRangeIterator::operator==(const USetRangeIterator&) const | (missing) | DraftICU 76
|
||||
| uset.h | bool U_HEADER_ONLY_NAMESPACE::USetStringIterator::operator!=(const USetStringIterator&) const | (missing) | DraftICU 76
|
||||
| uset.h | bool U_HEADER_ONLY_NAMESPACE::USetStringIterator::operator==(const USetStringIterator&) const | (missing) | DraftICU 76
|
||||
| uset.h | UChar32 U_HEADER_ONLY_NAMESPACE::USetCodePointIterator::operator* () const | (missing) | DraftICU 76
|
||||
| uset.h | const UChar* uset_getString(const USet*, int32_t, int32_t*) | (missing) | DraftICU 76
|
||||
| uset.h | int32_t uset_getStringCount(const USet*) | (missing) | DraftICU 76
|
||||
| uset.h | std::u16string_view U_HEADER_ONLY_NAMESPACE::USetStringIterator::operator* () const | (missing) | DraftICU 76
|
||||
| utypes.h | <tt>#define</tt> U_SHOW_CPLUSPLUS_HEADER_API | (missing) | Internal
|
||||
| utypes.h | <tt>enum</tt> UErrorCode::U_MF_DUPLICATE_VARIANT_ERROR | (missing) | InternalICU 76
|
||||
| locid.h | <tt>static</tt> Locale icu::Locale::createFromName(StringPiece) | (missing) | Internal
|
||||
| measunit.h | MeasureUnit icu::MeasureUnit::withConstantDenominator(uint64_t, UErrorCode&) const | (missing) | DraftICU 77
|
||||
| measunit.h | <tt>static</tt> MeasureUnit icu::MeasureUnit::getPortionPer1E9() | (missing) | DraftICU 77
|
||||
| measunit.h | <tt>static</tt> MeasureUnit* icu::MeasureUnit::createPortionPer1E9(UErrorCode&) | (missing) | DraftICU 77
|
||||
| measunit.h | uint64_t icu::MeasureUnit::getConstantDenominator(UErrorCode&) const | (missing) | DraftICU 77
|
||||
| messageformat2_data_model.h | Builder& icu::message2::MFDataModel::Builder::addSelector(VariableName&&, UErrorCode&) | (missing) | InternalICU 75
|
||||
| resbund.h | Locale icu::ResourceBundle::getLocale(ULocDataLocaleType, UErrorCode&) const | (missing) | StableICU 2.8
|
||||
| timezone.h | <tt>static</tt> UnicodeString icu::TimeZone::getEquivalentID(const UnicodeString&, int32_t) | (missing) | StableICU 2.0
|
||||
| uset.h | std::u16string U_HEADER_ONLY_NAMESPACE::USetElementIterator::operator* () const | (missing) | DraftICU 77
|
||||
| utypes.h | <tt>enum</tt> UErrorCode::U_MF_BAD_OPTION | (missing) | InternalICU 77
|
||||
|
||||
## Other
|
||||
|
||||
Other existing drafts in ICU 76
|
||||
Other existing drafts in ICU 77
|
||||
|
||||
| File | API | ICU 75 | ICU 76 |
|
||||
| File | API | ICU 76 | ICU 77 |
|
||||
|---|---|---|---|
|
||||
| coll.h | auto icu::Collator::equal_to() const | DraftICU 76 |
|
||||
| coll.h | auto icu::Collator::greater() const | DraftICU 76 |
|
||||
| coll.h | auto icu::Collator::greater_equal() const | DraftICU 76 |
|
||||
| coll.h | auto icu::Collator::less() const | DraftICU 76 |
|
||||
| coll.h | auto icu::Collator::less_equal() const | DraftICU 76 |
|
||||
| coll.h | auto icu::Collator::not_equal_to() const | DraftICU 76 |
|
||||
| measfmt.h | void icu::MeasureFormat::parseObject(const UnicodeString&, Formattable&, ParsePosition&) const | DraftICU 53 |
|
||||
| numberformatter.h | UnlocalizedNumberFormatter icu::number::LocalizedNumberFormatter::withoutLocale() && | DraftICU 75 |
|
||||
| numberformatter.h | UnlocalizedNumberFormatter icu::number::LocalizedNumberFormatter::withoutLocale() const & | DraftICU 75 |
|
||||
| numberrangeformatter.h | UnlocalizedNumberRangeFormatter icu::number::LocalizedNumberRangeFormatter::withoutLocale() && | DraftICU 75 |
|
||||
| numberrangeformatter.h | UnlocalizedNumberRangeFormatter icu::number::LocalizedNumberRangeFormatter::withoutLocale() const & | DraftICU 75 |
|
||||
| simplenumberformatter.h | void icu::number::SimpleNumber::setMaximumIntegerDigits(uint32_t, UErrorCode&) | DraftICU 75 |
|
||||
| uchar.h | bool u_hasIDType(UChar32, UIdentifierType) | DraftICU 75 |
|
||||
| uchar.h | <tt>enum</tt> UIdentifierStatus::U_ID_STATUS_ALLOWED | DraftICU 75 |
|
||||
| uchar.h | <tt>enum</tt> UIdentifierStatus::U_ID_STATUS_RESTRICTED | DraftICU 75 |
|
||||
| uchar.h | <tt>enum</tt> UIdentifierType::U_ID_TYPE_DEFAULT_IGNORABLE | DraftICU 75 |
|
||||
| uchar.h | <tt>enum</tt> UIdentifierType::U_ID_TYPE_DEPRECATED | DraftICU 75 |
|
||||
| uchar.h | <tt>enum</tt> UIdentifierType::U_ID_TYPE_EXCLUSION | DraftICU 75 |
|
||||
| uchar.h | <tt>enum</tt> UIdentifierType::U_ID_TYPE_INCLUSION | DraftICU 75 |
|
||||
| uchar.h | <tt>enum</tt> UIdentifierType::U_ID_TYPE_LIMITED_USE | DraftICU 75 |
|
||||
| uchar.h | <tt>enum</tt> UIdentifierType::U_ID_TYPE_NOT_CHARACTER | DraftICU 75 |
|
||||
| uchar.h | <tt>enum</tt> UIdentifierType::U_ID_TYPE_NOT_NFKC | DraftICU 75 |
|
||||
| uchar.h | <tt>enum</tt> UIdentifierType::U_ID_TYPE_NOT_XID | DraftICU 75 |
|
||||
| uchar.h | <tt>enum</tt> UIdentifierType::U_ID_TYPE_OBSOLETE | DraftICU 75 |
|
||||
| uchar.h | <tt>enum</tt> UIdentifierType::U_ID_TYPE_RECOMMENDED | DraftICU 75 |
|
||||
| uchar.h | <tt>enum</tt> UIdentifierType::U_ID_TYPE_TECHNICAL | DraftICU 75 |
|
||||
| uchar.h | <tt>enum</tt> UIdentifierType::U_ID_TYPE_UNCOMMON_USE | DraftICU 75 |
|
||||
| uchar.h | <tt>enum</tt> UProperty::UCHAR_IDENTIFIER_STATUS | DraftICU 75 |
|
||||
| uchar.h | <tt>enum</tt> UProperty::UCHAR_IDENTIFIER_TYPE | DraftICU 75 |
|
||||
| uchar.h | int32_t u_getIDTypes(UChar32, UIdentifierType*, int32_t, UErrorCode*) | DraftICU 75 |
|
||||
| measunit.h | <tt>static</tt> MeasureUnit icu::MeasureUnit::getLightSpeed() | DraftICU 76 |
|
||||
| measunit.h | <tt>static</tt> MeasureUnit icu::MeasureUnit::getNight() | DraftICU 76 |
|
||||
| measunit.h | <tt>static</tt> MeasureUnit* icu::MeasureUnit::createLightSpeed(UErrorCode&) | DraftICU 76 |
|
||||
| measunit.h | <tt>static</tt> MeasureUnit* icu::MeasureUnit::createNight(UErrorCode&) | DraftICU 76 |
|
||||
| uchar.h | <tt>enum</tt> UIndicConjunctBreak::U_INCB_CONSONANT | DraftICU 76 |
|
||||
| uchar.h | <tt>enum</tt> UIndicConjunctBreak::U_INCB_EXTEND | DraftICU 76 |
|
||||
| uchar.h | <tt>enum</tt> UIndicConjunctBreak::U_INCB_LINKER | DraftICU 76 |
|
||||
| uchar.h | <tt>enum</tt> UIndicConjunctBreak::U_INCB_NONE | DraftICU 76 |
|
||||
| uchar.h | <tt>enum</tt> UProperty::UCHAR_INDIC_CONJUNCT_BREAK | DraftICU 76 |
|
||||
| uchar.h | <tt>enum</tt> UProperty::UCHAR_MODIFIER_COMBINING_MARK | DraftICU 76 |
|
||||
| uniset.h | U_HEADER_NESTED_NAMESPACE::USetCodePoints icu::UnicodeSet::codePoints() const | DraftICU 76 |
|
||||
| uniset.h | U_HEADER_NESTED_NAMESPACE::USetRanges icu::UnicodeSet::ranges() const | DraftICU 76 |
|
||||
| uniset.h | U_HEADER_NESTED_NAMESPACE::USetStrings icu::UnicodeSet::strings() const | DraftICU 76 |
|
||||
| unistr.h | UNISTR_FROM_STRING_EXPLICIT icu::UnicodeString::UnicodeString(const S&) | DraftICU 76 |
|
||||
| unistr.h | UnicodeString& icu::UnicodeString::append(const S&) | DraftICU 76 |
|
||||
| unistr.h | UnicodeString& icu::UnicodeString::operator+=(const S&) | DraftICU 76 |
|
||||
| unistr.h | UnicodeString& icu::UnicodeString::operator=(const S&) | DraftICU 76 |
|
||||
| unistr.h | bool icu::UnicodeString::operator!=(const S&) const | DraftICU 76 |
|
||||
| unistr.h | bool icu::UnicodeString::operator==(const S&) const | DraftICU 76 |
|
||||
| unistr.h | icu::UnicodeString::operator std::u16string_view() const | DraftICU 76 |
|
||||
| unistr.h | icu::UnicodeString::operator std::wstring_view() const | DraftICU 76 |
|
||||
| unistr.h | <tt>static</tt> UnicodeString icu::UnicodeString::readOnlyAlias(const S&) | DraftICU 76 |
|
||||
| unistr.h | <tt>static</tt> UnicodeString icu::UnicodeString::readOnlyAlias(const UnicodeString&) | DraftICU 76 |
|
||||
| uregex.h | <tt>enum</tt> URegexpFlag::UREGEX_CANON_EQ | DraftICU 2.4 |
|
||||
| usimplenumberformatter.h | void usnum_setMaximumIntegerDigits(USimpleNumber*, int32_t, UErrorCode*) | DraftICU 75 |
|
||||
| uset.h | CodePointRange U_HEADER_ONLY_NAMESPACE::USetRangeIterator::operator* () const | DraftICU 76 |
|
||||
| uset.h | USetCodePointIterator & U_HEADER_ONLY_NAMESPACE::USetCodePointIterator::operator++() | DraftICU 76 |
|
||||
| uset.h | USetCodePointIterator U_HEADER_ONLY_NAMESPACE::USetCodePointIterator::operator++(int) | DraftICU 76 |
|
||||
| uset.h | USetCodePointIterator U_HEADER_ONLY_NAMESPACE::USetCodePoints::begin() const | DraftICU 76 |
|
||||
| uset.h | USetCodePointIterator U_HEADER_ONLY_NAMESPACE::USetCodePoints::end() const | DraftICU 76 |
|
||||
| uset.h | USetRangeIterator & U_HEADER_ONLY_NAMESPACE::USetRangeIterator::operator++() | DraftICU 76 |
|
||||
| uset.h | USetRangeIterator U_HEADER_ONLY_NAMESPACE::USetRangeIterator::operator++(int) | DraftICU 76 |
|
||||
| uset.h | USetRangeIterator U_HEADER_ONLY_NAMESPACE::USetRanges::begin() const | DraftICU 76 |
|
||||
| uset.h | USetRangeIterator U_HEADER_ONLY_NAMESPACE::USetRanges::end() const | DraftICU 76 |
|
||||
| uset.h | USetStringIterator & U_HEADER_ONLY_NAMESPACE::USetStringIterator::operator++() | DraftICU 76 |
|
||||
| uset.h | USetStringIterator U_HEADER_ONLY_NAMESPACE::USetStringIterator::operator++(int) | DraftICU 76 |
|
||||
| uset.h | USetStringIterator U_HEADER_ONLY_NAMESPACE::USetStrings::begin() const | DraftICU 76 |
|
||||
| uset.h | USetStringIterator U_HEADER_ONLY_NAMESPACE::USetStrings::end() const | DraftICU 76 |
|
||||
| uset.h | U_HEADER_ONLY_NAMESPACE::USetCodePointIterator::USetCodePointIterator(const USetCodePointIterator&)=default | DraftICU 76 |
|
||||
| uset.h | U_HEADER_ONLY_NAMESPACE::USetCodePoints::USetCodePoints(const USet*) | DraftICU 76 |
|
||||
| uset.h | U_HEADER_ONLY_NAMESPACE::USetCodePoints::USetCodePoints(const USetCodePoints&)=default | DraftICU 76 |
|
||||
| uset.h | U_HEADER_ONLY_NAMESPACE::USetRangeIterator::USetRangeIterator(const USetRangeIterator&)=default | DraftICU 76 |
|
||||
| uset.h | U_HEADER_ONLY_NAMESPACE::USetRanges::USetRanges(const USet*) | DraftICU 76 |
|
||||
| uset.h | U_HEADER_ONLY_NAMESPACE::USetRanges::USetRanges(const USetRanges&)=default | DraftICU 76 |
|
||||
| uset.h | U_HEADER_ONLY_NAMESPACE::USetStringIterator::USetStringIterator(const USetStringIterator&)=default | DraftICU 76 |
|
||||
| uset.h | U_HEADER_ONLY_NAMESPACE::USetStrings::USetStrings(const USet*) | DraftICU 76 |
|
||||
| uset.h | U_HEADER_ONLY_NAMESPACE::USetStrings::USetStrings(const USetStrings&)=default | DraftICU 76 |
|
||||
| uset.h | bool U_HEADER_ONLY_NAMESPACE::USetCodePointIterator::operator!=(const USetCodePointIterator&) const | DraftICU 76 |
|
||||
| uset.h | bool U_HEADER_ONLY_NAMESPACE::USetCodePointIterator::operator==(const USetCodePointIterator&) const | DraftICU 76 |
|
||||
| uset.h | bool U_HEADER_ONLY_NAMESPACE::USetRangeIterator::operator!=(const USetRangeIterator&) const | DraftICU 76 |
|
||||
| uset.h | bool U_HEADER_ONLY_NAMESPACE::USetRangeIterator::operator==(const USetRangeIterator&) const | DraftICU 76 |
|
||||
| uset.h | bool U_HEADER_ONLY_NAMESPACE::USetStringIterator::operator!=(const USetStringIterator&) const | DraftICU 76 |
|
||||
| uset.h | bool U_HEADER_ONLY_NAMESPACE::USetStringIterator::operator==(const USetStringIterator&) const | DraftICU 76 |
|
||||
| uset.h | UChar32 U_HEADER_ONLY_NAMESPACE::USetCodePointIterator::operator* () const | DraftICU 76 |
|
||||
| uset.h | const UChar* uset_getString(const USet*, int32_t, int32_t*) | DraftICU 76 |
|
||||
| uset.h | int32_t uset_getStringCount(const USet*) | DraftICU 76 |
|
||||
| uset.h | std::u16string_view U_HEADER_ONLY_NAMESPACE::USetStringIterator::operator* () const | DraftICU 76 |
|
||||
|
||||
## Simplifications
|
||||
|
||||
|
@ -357,7 +207,7 @@ This section shows cases where the signature was "simplified" for the sake of co
|
|||
|
||||
## Colophon
|
||||
|
||||
Contents generated by StableAPI tool on Tue Sep 24 13:19:44 PDT 2024
|
||||
Contents generated by StableAPI tool on Wed Feb 19 16:10:28 PST 2025
|
||||
|
||||
Copyright © 2019 and later: Unicode, Inc. and others.
|
||||
License & terms of use: http://www.unicode.org/copyright.html
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Doxyfile 1.8.13
|
||||
# Doxyfile 1.9.1
|
||||
|
||||
# Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
# License & terms of use: http://www.unicode.org/copyright.html
|
||||
|
@ -25,11 +25,11 @@
|
|||
# Project related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# This tag specifies the encoding used for all characters in the config file
|
||||
# that follow. The default is UTF-8 which is also the encoding used for all text
|
||||
# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv
|
||||
# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv
|
||||
# for the list of possible encodings.
|
||||
# This tag specifies the encoding used for all characters in the configuration
|
||||
# file that follow. The default is UTF-8 which is also the encoding used for all
|
||||
# text before the first occurrence of this tag. Doxygen uses libiconv (or the
|
||||
# iconv built into libc) for the transcoding. See
|
||||
# https://www.gnu.org/software/libiconv/ for the list of possible encodings.
|
||||
# The default value is: UTF-8.
|
||||
|
||||
DOXYFILE_ENCODING = UTF-8
|
||||
|
@ -101,6 +101,14 @@ ALLOW_UNICODE_NAMES = NO
|
|||
|
||||
OUTPUT_LANGUAGE = English
|
||||
|
||||
# The OUTPUT_TEXT_DIRECTION tag is used to specify the direction in which all
|
||||
# documentation generated by doxygen is written. Doxygen will use this
|
||||
# information to generate all generated output in the proper direction.
|
||||
# Possible values are: None, LTR, RTL and Context.
|
||||
# The default value is: None.
|
||||
|
||||
OUTPUT_TEXT_DIRECTION = None
|
||||
|
||||
# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member
|
||||
# descriptions after the members that are listed in the file and class
|
||||
# documentation (similar to Javadoc). Set to NO to disable this.
|
||||
|
@ -187,6 +195,16 @@ SHORT_NAMES = NO
|
|||
|
||||
JAVADOC_AUTOBRIEF = YES
|
||||
|
||||
# If the JAVADOC_BANNER tag is set to YES then doxygen will interpret a line
|
||||
# such as
|
||||
# /***************
|
||||
# as being the beginning of a Javadoc-style comment "banner". If set to NO, the
|
||||
# Javadoc-style will behave just like regular comments and it will not be
|
||||
# interpreted by doxygen.
|
||||
# The default value is: NO.
|
||||
|
||||
JAVADOC_BANNER = NO
|
||||
|
||||
# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
|
||||
# line (until the first dot) of a Qt-style comment as the brief description. If
|
||||
# set to NO, the Qt-style will behave just like regular Qt-style comments (thus
|
||||
|
@ -207,6 +225,14 @@ QT_AUTOBRIEF = NO
|
|||
|
||||
MULTILINE_CPP_IS_BRIEF = NO
|
||||
|
||||
# By default Python docstrings are displayed as preformatted text and doxygen's
|
||||
# special commands cannot be used. By setting PYTHON_DOCSTRING to NO the
|
||||
# doxygen's special commands can be used and the contents of the docstring
|
||||
# documentation blocks is shown as doxygen documentation.
|
||||
# The default value is: YES.
|
||||
|
||||
PYTHON_DOCSTRING = YES
|
||||
|
||||
# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the
|
||||
# documentation from any documented member that it re-implements.
|
||||
# The default value is: YES.
|
||||
|
@ -234,7 +260,12 @@ TAB_SIZE = 8
|
|||
# will allow you to put the command \sideeffect (or @sideeffect) in the
|
||||
# documentation, which will result in a user-defined paragraph with heading
|
||||
# "Side Effects:". You can put \n's in the value part of an alias to insert
|
||||
# newlines.
|
||||
# newlines (in the resulting output). You can put ^^ in the value part of an
|
||||
# alias to insert a newline as if a physical newline was in the original file.
|
||||
# When you need a literal { or } or , in the value part of an alias you have to
|
||||
# escape them by means of a backslash (\), this can lead to conflicts with the
|
||||
# commands \{ and \} for these it is advised to use the version @{ and @} or use
|
||||
# a double escape (\\{ and \\})
|
||||
|
||||
ALIASES = "memo=\par Note:\n" \
|
||||
"draft=\xrefitem draft \"Draft\" \"Draft List\" This API may be changed in the future versions and was introduced in" \
|
||||
|
@ -244,12 +275,6 @@ ALIASES = "memo=\par Note:\n" \
|
|||
"system=\xrefitem system \"System\" \"System List\" \n Do not use unless you know what you are doing." \
|
||||
"internal=\xrefitem internal \"Internal\" \"Internal List\" Do not use. This API is for internal use only."
|
||||
|
||||
# This tag can be used to specify a number of word-keyword mappings (TCL only).
|
||||
# A mapping has the form "name=value". For example adding "class=itcl::class"
|
||||
# will allow you to use the command class in the itcl::class meaning.
|
||||
|
||||
TCL_SUBST =
|
||||
|
||||
# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
|
||||
# only. Doxygen will then generate output that is more tailored for C. For
|
||||
# instance, some of the names that are used will be different. The list of all
|
||||
|
@ -278,28 +303,40 @@ OPTIMIZE_FOR_FORTRAN = NO
|
|||
|
||||
OPTIMIZE_OUTPUT_VHDL = NO
|
||||
|
||||
# Set the OPTIMIZE_OUTPUT_SLICE tag to YES if your project consists of Slice
|
||||
# sources only. Doxygen will then generate output that is more tailored for that
|
||||
# language. For instance, namespaces will be presented as modules, types will be
|
||||
# separated into more groups, etc.
|
||||
# The default value is: NO.
|
||||
|
||||
OPTIMIZE_OUTPUT_SLICE = NO
|
||||
|
||||
# Doxygen selects the parser to use depending on the extension of the files it
|
||||
# parses. With this tag you can assign which parser to use for a given
|
||||
# extension. Doxygen has a built-in mapping, but you can override or extend it
|
||||
# using this tag. The format is ext=language, where ext is a file extension, and
|
||||
# language is one of the parsers supported by doxygen: IDL, Java, Javascript,
|
||||
# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran:
|
||||
# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran:
|
||||
# Fortran. In the later case the parser tries to guess whether the code is fixed
|
||||
# or free formatted code, this is the default for Fortran type files), VHDL. For
|
||||
# instance to make doxygen treat .inc files as Fortran files (default is PHP),
|
||||
# and .f files as C (default is Fortran), use: inc=Fortran f=C.
|
||||
# language is one of the parsers supported by doxygen: IDL, Java, JavaScript,
|
||||
# Csharp (C#), C, C++, D, PHP, md (Markdown), Objective-C, Python, Slice, VHDL,
|
||||
# Fortran (fixed format Fortran: FortranFixed, free formatted Fortran:
|
||||
# FortranFree, unknown formatted Fortran: Fortran. In the later case the parser
|
||||
# tries to guess whether the code is fixed or free formatted code, this is the
|
||||
# default for Fortran type files). For instance to make doxygen treat .inc files
|
||||
# as Fortran files (default is PHP), and .f files as C (default is Fortran),
|
||||
# use: inc=Fortran f=C.
|
||||
#
|
||||
# Note: For files without extension you can use no_extension as a placeholder.
|
||||
#
|
||||
# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
|
||||
# the files are not read by doxygen.
|
||||
# the files are not read by doxygen. When specifying no_extension you should add
|
||||
# * to the FILE_PATTERNS.
|
||||
#
|
||||
# Note see also the list of default file extension mappings.
|
||||
|
||||
EXTENSION_MAPPING =
|
||||
|
||||
# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
|
||||
# according to the Markdown format, which allows for more readable
|
||||
# documentation. See http://daringfireball.net/projects/markdown/ for details.
|
||||
# documentation. See https://daringfireball.net/projects/markdown/ for details.
|
||||
# The output of markdown processing is further processed by doxygen, so you can
|
||||
# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
|
||||
# case of backward compatibilities issues.
|
||||
|
@ -311,7 +348,7 @@ MARKDOWN_SUPPORT = YES
|
|||
# to that level are automatically included in the table of contents, even if
|
||||
# they do not have an id attribute.
|
||||
# Note: This feature currently applies only to Markdown headings.
|
||||
# Minimum value: 0, maximum value: 99, default value: 0.
|
||||
# Minimum value: 0, maximum value: 99, default value: 5.
|
||||
# This tag requires that the tag MARKDOWN_SUPPORT is set to YES.
|
||||
|
||||
TOC_INCLUDE_HEADINGS = 0
|
||||
|
@ -341,7 +378,7 @@ BUILTIN_STL_SUPPORT = NO
|
|||
CPP_CLI_SUPPORT = NO
|
||||
|
||||
# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
|
||||
# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
|
||||
# https://www.riverbankcomputing.com/software/sip/intro) sources only. Doxygen
|
||||
# will parse them like normal C++ but will assume all classes use public instead
|
||||
# of private inheritance when no explicit protection keyword is present.
|
||||
# The default value is: NO.
|
||||
|
@ -427,6 +464,19 @@ TYPEDEF_HIDES_STRUCT = NO
|
|||
|
||||
LOOKUP_CACHE_SIZE = 0
|
||||
|
||||
# The NUM_PROC_THREADS specifies the number threads doxygen is allowed to use
|
||||
# during processing. When set to 0 doxygen will based this on the number of
|
||||
# cores available in the system. You can set it explicitly to a value larger
|
||||
# than 0 to get more control over the balance between CPU load and processing
|
||||
# speed. At this moment only the input processing can be done using multiple
|
||||
# threads. Since this is still an experimental feature the default is set to 1,
|
||||
# which efficively disables parallel processing. Please report any issues you
|
||||
# encounter. Generating dot graphs in parallel is controlled by the
|
||||
# DOT_NUM_THREADS setting.
|
||||
# Minimum value: 0, maximum value: 32, default value: 1.
|
||||
|
||||
NUM_PROC_THREADS = 1
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Build related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
|
@ -447,6 +497,12 @@ EXTRACT_ALL = NO
|
|||
|
||||
EXTRACT_PRIVATE = NO
|
||||
|
||||
# If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual
|
||||
# methods of a class will be included in the documentation.
|
||||
# The default value is: NO.
|
||||
|
||||
EXTRACT_PRIV_VIRTUAL = NO
|
||||
|
||||
# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal
|
||||
# scope will be included in the documentation.
|
||||
# The default value is: NO.
|
||||
|
@ -484,6 +540,13 @@ EXTRACT_LOCAL_METHODS = NO
|
|||
|
||||
EXTRACT_ANON_NSPACES = NO
|
||||
|
||||
# If this flag is set to YES, the name of an unnamed parameter in a declaration
|
||||
# will be determined by the corresponding definition. By default unnamed
|
||||
# parameters remain unnamed in the output.
|
||||
# The default value is: YES.
|
||||
|
||||
RESOLVE_UNNAMED_PARAMS = YES
|
||||
|
||||
# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
|
||||
# undocumented members inside documented classes or files. If set to NO these
|
||||
# members will be included in the various overviews, but no documentation
|
||||
|
@ -501,8 +564,8 @@ HIDE_UNDOC_MEMBERS = NO
|
|||
HIDE_UNDOC_CLASSES = NO
|
||||
|
||||
# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
|
||||
# (class|struct|union) declarations. If set to NO, these declarations will be
|
||||
# included in the documentation.
|
||||
# declarations. If set to NO, these declarations will be included in the
|
||||
# documentation.
|
||||
# The default value is: NO.
|
||||
|
||||
HIDE_FRIEND_COMPOUNDS = NO
|
||||
|
@ -521,11 +584,18 @@ HIDE_IN_BODY_DOCS = NO
|
|||
|
||||
INTERNAL_DOCS = YES
|
||||
|
||||
# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file
|
||||
# names in lower-case letters. If set to YES, upper-case letters are also
|
||||
# allowed. This is useful if you have classes or files whose names only differ
|
||||
# in case and if your file system supports case sensitive file names. Windows
|
||||
# and Mac users are advised to set this option to NO.
|
||||
# With the correct setting of option CASE_SENSE_NAMES doxygen will better be
|
||||
# able to match the capabilities of the underlying filesystem. In case the
|
||||
# filesystem is case sensitive (i.e. it supports files in the same directory
|
||||
# whose names only differ in casing), the option must be set to YES to properly
|
||||
# deal with such files in case they appear in the input. For filesystems that
|
||||
# are not case sensitive the option should be be set to NO to properly deal with
|
||||
# output files written for symbols that only differ in casing, such as for two
|
||||
# classes, one named CLASS and the other named Class, and to also support
|
||||
# references to files without having to specify the exact matching casing. On
|
||||
# Windows (including Cygwin) and MacOS, users should typically set this option
|
||||
# to NO, whereas on Linux or other Unix flavors it should typically be set to
|
||||
# YES.
|
||||
# The default value is: system dependent.
|
||||
|
||||
CASE_SENSE_NAMES = YES
|
||||
|
@ -712,7 +782,7 @@ LAYOUT_FILE =
|
|||
# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
|
||||
# the reference definitions. This must be a list of .bib files. The .bib
|
||||
# extension is automatically appended if omitted. This requires the bibtex tool
|
||||
# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info.
|
||||
# to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info.
|
||||
# For LaTeX the style of the bibliography can be controlled using
|
||||
# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
|
||||
# search path. See also \cite for info how to create references.
|
||||
|
@ -757,13 +827,17 @@ WARN_IF_DOC_ERROR = YES
|
|||
# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
|
||||
# are documented, but have no documentation for their parameters or return
|
||||
# value. If set to NO, doxygen will only warn about wrong or incomplete
|
||||
# parameter documentation, but not about the absence of documentation.
|
||||
# parameter documentation, but not about the absence of documentation. If
|
||||
# EXTRACT_ALL is set to YES then this flag will automatically be disabled.
|
||||
# The default value is: NO.
|
||||
|
||||
WARN_NO_PARAMDOC = NO
|
||||
|
||||
# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when
|
||||
# a warning is encountered.
|
||||
# a warning is encountered. If the WARN_AS_ERROR tag is set to FAIL_ON_WARNINGS
|
||||
# then doxygen will continue running as if WARN_AS_ERROR tag is set to NO, but
|
||||
# at the end of the doxygen process doxygen will return with a non-zero status.
|
||||
# Possible values are: NO, YES and FAIL_ON_WARNINGS.
|
||||
# The default value is: NO.
|
||||
|
||||
WARN_AS_ERROR = NO
|
||||
|
@ -802,8 +876,8 @@ INPUT = @srcdir@/common/unicode \
|
|||
# This tag can be used to specify the character encoding of the source files
|
||||
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
|
||||
# libiconv (or the iconv built into libc) for the transcoding. See the libiconv
|
||||
# documentation (see: http://www.gnu.org/software/libiconv) for the list of
|
||||
# possible encodings.
|
||||
# documentation (see:
|
||||
# https://www.gnu.org/software/libiconv/) for the list of possible encodings.
|
||||
# The default value is: UTF-8.
|
||||
|
||||
INPUT_ENCODING = UTF-8
|
||||
|
@ -816,11 +890,15 @@ INPUT_ENCODING = UTF-8
|
|||
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
|
||||
# read by doxygen.
|
||||
#
|
||||
# Note the list of default checked file patterns might differ from the list of
|
||||
# default file extension mappings.
|
||||
#
|
||||
# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp,
|
||||
# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h,
|
||||
# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc,
|
||||
# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f95, *.f03, *.f08,
|
||||
# *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf and *.qsf.
|
||||
# *.m, *.markdown, *.md, *.mm, *.dox (to be provided as doxygen C comment),
|
||||
# *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f18, *.f, *.for, *.vhd, *.vhdl,
|
||||
# *.ucf, *.qsf and *.ice.
|
||||
|
||||
FILE_PATTERNS = *.h
|
||||
|
||||
|
@ -979,7 +1057,7 @@ INLINE_SOURCES = NO
|
|||
STRIP_CODE_COMMENTS = YES
|
||||
|
||||
# If the REFERENCED_BY_RELATION tag is set to YES then for each documented
|
||||
# function all documented functions referencing it will be listed.
|
||||
# entity all documented functions referencing it will be listed.
|
||||
# The default value is: NO.
|
||||
|
||||
REFERENCED_BY_RELATION = YES
|
||||
|
@ -1011,12 +1089,12 @@ SOURCE_TOOLTIPS = YES
|
|||
# If the USE_HTAGS tag is set to YES then the references to source code will
|
||||
# point to the HTML generated by the htags(1) tool instead of doxygen built-in
|
||||
# source browser. The htags tool is part of GNU's global source tagging system
|
||||
# (see http://www.gnu.org/software/global/global.html). You will need version
|
||||
# (see https://www.gnu.org/software/global/global.html). You will need version
|
||||
# 4.8.6 or higher.
|
||||
#
|
||||
# To use it do the following:
|
||||
# - Install the latest version of global
|
||||
# - Enable SOURCE_BROWSER and USE_HTAGS in the config file
|
||||
# - Enable SOURCE_BROWSER and USE_HTAGS in the configuration file
|
||||
# - Make sure the INPUT points to the root of the source tree
|
||||
# - Run doxygen as normal
|
||||
#
|
||||
|
@ -1039,16 +1117,22 @@ USE_HTAGS = NO
|
|||
VERBATIM_HEADERS = YES
|
||||
|
||||
# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the
|
||||
# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the
|
||||
# cost of reduced performance. This can be particularly helpful with template
|
||||
# rich C++ code for which doxygen's built-in parser lacks the necessary type
|
||||
# information.
|
||||
# clang parser (see:
|
||||
# http://clang.llvm.org/) for more accurate parsing at the cost of reduced
|
||||
# performance. This can be particularly helpful with template rich C++ code for
|
||||
# which doxygen's built-in parser lacks the necessary type information.
|
||||
# Note: The availability of this option depends on whether or not doxygen was
|
||||
# generated with the -Duse-libclang=ON option for CMake.
|
||||
# generated with the -Duse_libclang=ON option for CMake.
|
||||
# The default value is: NO.
|
||||
|
||||
CLANG_ASSISTED_PARSING = NO
|
||||
|
||||
# If clang assisted parsing is enabled and the CLANG_ADD_INC_PATHS tag is set to
|
||||
# YES then doxygen will add the directory of each input to the include path.
|
||||
# The default value is: YES.
|
||||
|
||||
CLANG_ADD_INC_PATHS = YES
|
||||
|
||||
# If clang assisted parsing is enabled you can provide the compiler with command
|
||||
# line options that you would normally use when invoking the compiler. Note that
|
||||
# the include paths will already be set by doxygen for the files and directories
|
||||
|
@ -1057,6 +1141,19 @@ CLANG_ASSISTED_PARSING = NO
|
|||
|
||||
CLANG_OPTIONS =
|
||||
|
||||
# If clang assisted parsing is enabled you can provide the clang parser with the
|
||||
# path to the directory containing a file called compile_commands.json. This
|
||||
# file is the compilation database (see:
|
||||
# http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html) containing the
|
||||
# options used when the source files were built. This is equivalent to
|
||||
# specifying the -p option to a clang tool, such as clang-check. These options
|
||||
# will then be passed to the parser. Any options specified with CLANG_OPTIONS
|
||||
# will be added as well.
|
||||
# Note: The availability of this option depends on whether or not doxygen was
|
||||
# generated with the -Duse_libclang=ON option for CMake.
|
||||
|
||||
CLANG_DATABASE_PATH =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the alphabetical class index
|
||||
#---------------------------------------------------------------------------
|
||||
|
@ -1068,13 +1165,6 @@ CLANG_OPTIONS =
|
|||
|
||||
ALPHABETICAL_INDEX = YES
|
||||
|
||||
# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in
|
||||
# which the alphabetical index list will be split.
|
||||
# Minimum value: 1, maximum value: 20, default value: 5.
|
||||
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
|
||||
|
||||
COLS_IN_ALPHA_INDEX = 5
|
||||
|
||||
# In case all classes in a project start with a common prefix, all classes will
|
||||
# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag
|
||||
# can be used to specify a prefix (or a list of prefixes) that should be ignored
|
||||
|
@ -1175,7 +1265,7 @@ HTML_EXTRA_FILES =
|
|||
# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
|
||||
# will adjust the colors in the style sheet and background images according to
|
||||
# this color. Hue is specified as an angle on a colorwheel, see
|
||||
# http://en.wikipedia.org/wiki/Hue for more information. For instance the value
|
||||
# https://en.wikipedia.org/wiki/Hue for more information. For instance the value
|
||||
# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
|
||||
# purple, and 360 is red again.
|
||||
# Minimum value: 0, maximum value: 359, default value: 220.
|
||||
|
@ -1211,6 +1301,17 @@ HTML_COLORSTYLE_GAMMA = 80
|
|||
|
||||
HTML_TIMESTAMP = NO
|
||||
|
||||
# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML
|
||||
# documentation will contain a main index with vertical navigation menus that
|
||||
# are dynamically created via JavaScript. If disabled, the navigation index will
|
||||
# consists of multiple levels of tabs that are statically embedded in every HTML
|
||||
# page. Disable this option to support browsers that do not have JavaScript,
|
||||
# like the Qt help browser.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
HTML_DYNAMIC_MENUS = YES
|
||||
|
||||
# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
|
||||
# documentation will contain sections that can be hidden and shown after the
|
||||
# page has loaded.
|
||||
|
@ -1234,13 +1335,14 @@ HTML_INDEX_NUM_ENTRIES = 100
|
|||
|
||||
# If the GENERATE_DOCSET tag is set to YES, additional index files will be
|
||||
# generated that can be used as input for Apple's Xcode 3 integrated development
|
||||
# environment (see: http://developer.apple.com/tools/xcode/), introduced with
|
||||
# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a
|
||||
# Makefile in the HTML output directory. Running make will produce the docset in
|
||||
# that directory and running make install will install the docset in
|
||||
# environment (see:
|
||||
# https://developer.apple.com/xcode/), introduced with OSX 10.5 (Leopard). To
|
||||
# create a documentation set, doxygen will generate a Makefile in the HTML
|
||||
# output directory. Running make will produce the docset in that directory and
|
||||
# running make install will install the docset in
|
||||
# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
|
||||
# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
|
||||
# for more information.
|
||||
# startup. See https://developer.apple.com/library/archive/featuredarticles/Doxy
|
||||
# genXcode/_index.html for more information.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
|
@ -1279,8 +1381,8 @@ DOCSET_PUBLISHER_NAME = Publisher
|
|||
# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
|
||||
# additional HTML index files: index.hhp, index.hhc, and index.hhk. The
|
||||
# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
|
||||
# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on
|
||||
# Windows.
|
||||
# (see:
|
||||
# https://www.microsoft.com/en-us/download/details.aspx?id=21138) on Windows.
|
||||
#
|
||||
# The HTML Help Workshop contains a compiler that can convert all HTML output
|
||||
# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML
|
||||
|
@ -1310,7 +1412,7 @@ CHM_FILE =
|
|||
HHC_LOCATION =
|
||||
|
||||
# The GENERATE_CHI flag controls if a separate .chi index file is generated
|
||||
# (YES) or that it should be included in the primary .chm file (NO).
|
||||
# (YES) or that it should be included in the main .chm file (NO).
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
|
||||
|
||||
|
@ -1355,7 +1457,8 @@ QCH_FILE =
|
|||
|
||||
# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
|
||||
# Project output. For more information please see Qt Help Project / Namespace
|
||||
# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).
|
||||
# (see:
|
||||
# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace).
|
||||
# The default value is: org.doxygen.Project.
|
||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||
|
||||
|
@ -1363,8 +1466,8 @@ QHP_NAMESPACE = org.doxygen.Project
|
|||
|
||||
# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
|
||||
# Help Project output. For more information please see Qt Help Project / Virtual
|
||||
# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
|
||||
# folders).
|
||||
# Folders (see:
|
||||
# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual-folders).
|
||||
# The default value is: doc.
|
||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||
|
||||
|
@ -1372,30 +1475,30 @@ QHP_VIRTUAL_FOLDER = doc
|
|||
|
||||
# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
|
||||
# filter to add. For more information please see Qt Help Project / Custom
|
||||
# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
|
||||
# filters).
|
||||
# Filters (see:
|
||||
# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters).
|
||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||
|
||||
QHP_CUST_FILTER_NAME =
|
||||
|
||||
# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
|
||||
# custom filter to add. For more information please see Qt Help Project / Custom
|
||||
# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
|
||||
# filters).
|
||||
# Filters (see:
|
||||
# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters).
|
||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||
|
||||
QHP_CUST_FILTER_ATTRS =
|
||||
|
||||
# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
|
||||
# project's filter section matches. Qt Help Project / Filter Attributes (see:
|
||||
# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
|
||||
# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#filter-attributes).
|
||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||
|
||||
QHP_SECT_FILTER_ATTRS =
|
||||
|
||||
# The QHG_LOCATION tag can be used to specify the location of Qt's
|
||||
# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the
|
||||
# generated .qhp file.
|
||||
# The QHG_LOCATION tag can be used to specify the location (absolute path
|
||||
# including file name) of Qt's qhelpgenerator. If non-empty doxygen will try to
|
||||
# run qhelpgenerator on the generated .qhp file.
|
||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||
|
||||
QHG_LOCATION =
|
||||
|
@ -1472,6 +1575,17 @@ TREEVIEW_WIDTH = 250
|
|||
|
||||
EXT_LINKS_IN_WINDOW = NO
|
||||
|
||||
# If the HTML_FORMULA_FORMAT option is set to svg, doxygen will use the pdf2svg
|
||||
# tool (see https://github.com/dawbarton/pdf2svg) or inkscape (see
|
||||
# https://inkscape.org) to generate formulas as SVG images instead of PNGs for
|
||||
# the HTML output. These images will generally look nicer at scaled resolutions.
|
||||
# Possible values are: png (the default) and svg (looks nicer but requires the
|
||||
# pdf2svg or inkscape tool).
|
||||
# The default value is: png.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
HTML_FORMULA_FORMAT = png
|
||||
|
||||
# Use this tag to change the font size of LaTeX formulas included as images in
|
||||
# the HTML documentation. When you change the font size after a successful
|
||||
# doxygen run you need to manually remove any form_*.png images from the HTML
|
||||
|
@ -1481,7 +1595,7 @@ EXT_LINKS_IN_WINDOW = NO
|
|||
|
||||
FORMULA_FONTSIZE = 10
|
||||
|
||||
# Use the FORMULA_TRANPARENT tag to determine whether or not the images
|
||||
# Use the FORMULA_TRANSPARENT tag to determine whether or not the images
|
||||
# generated for formulas are transparent PNGs. Transparent PNGs are not
|
||||
# supported properly for IE 6.0, but are supported on all modern browsers.
|
||||
#
|
||||
|
@ -1492,8 +1606,14 @@ FORMULA_FONTSIZE = 10
|
|||
|
||||
FORMULA_TRANSPARENT = YES
|
||||
|
||||
# The FORMULA_MACROFILE can contain LaTeX \newcommand and \renewcommand commands
|
||||
# to create new LaTeX commands to be used in formulas as building blocks. See
|
||||
# the section "Including formulas" for details.
|
||||
|
||||
FORMULA_MACROFILE =
|
||||
|
||||
# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
|
||||
# http://www.mathjax.org) which uses client side Javascript for the rendering
|
||||
# https://www.mathjax.org) which uses client side JavaScript for the rendering
|
||||
# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX
|
||||
# installed or if you want to formulas look prettier in the HTML output. When
|
||||
# enabled you may also need to install MathJax separately and configure the path
|
||||
|
@ -1505,7 +1625,7 @@ USE_MATHJAX = NO
|
|||
|
||||
# When MathJax is enabled you can set the default output format to be used for
|
||||
# the MathJax output. See the MathJax site (see:
|
||||
# http://docs.mathjax.org/en/latest/output.html) for more details.
|
||||
# http://docs.mathjax.org/en/v2.7-latest/output.html) for more details.
|
||||
# Possible values are: HTML-CSS (which is slower, but has the best
|
||||
# compatibility), NativeMML (i.e. MathML) and SVG.
|
||||
# The default value is: HTML-CSS.
|
||||
|
@ -1520,8 +1640,8 @@ MATHJAX_FORMAT = HTML-CSS
|
|||
# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
|
||||
# Content Delivery Network so you can quickly see the result without installing
|
||||
# MathJax. However, it is strongly recommended to install a local copy of
|
||||
# MathJax from http://www.mathjax.org before deployment.
|
||||
# The default value is: http://cdn.mathjax.org/mathjax/latest.
|
||||
# MathJax from https://www.mathjax.org before deployment.
|
||||
# The default value is: https://cdn.jsdelivr.net/npm/mathjax@2.
|
||||
# This tag requires that the tag USE_MATHJAX is set to YES.
|
||||
|
||||
MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
|
||||
|
@ -1535,7 +1655,8 @@ MATHJAX_EXTENSIONS =
|
|||
|
||||
# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces
|
||||
# of code that will be used on startup of the MathJax code. See the MathJax site
|
||||
# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an
|
||||
# (see:
|
||||
# http://docs.mathjax.org/en/v2.7-latest/output.html) for more details. For an
|
||||
# example see the documentation.
|
||||
# This tag requires that the tag USE_MATHJAX is set to YES.
|
||||
|
||||
|
@ -1563,7 +1684,7 @@ MATHJAX_CODEFILE =
|
|||
SEARCHENGINE = NO
|
||||
|
||||
# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
|
||||
# implemented using a web server instead of a web client using Javascript. There
|
||||
# implemented using a web server instead of a web client using JavaScript. There
|
||||
# are two flavors of web server based searching depending on the EXTERNAL_SEARCH
|
||||
# setting. When disabled, doxygen will generate a PHP script for searching and
|
||||
# an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing
|
||||
|
@ -1582,7 +1703,8 @@ SERVER_BASED_SEARCH = NO
|
|||
#
|
||||
# Doxygen ships with an example indexer (doxyindexer) and search engine
|
||||
# (doxysearch.cgi) which are based on the open source search engine library
|
||||
# Xapian (see: http://xapian.org/).
|
||||
# Xapian (see:
|
||||
# https://xapian.org/).
|
||||
#
|
||||
# See the section "External Indexing and Searching" for details.
|
||||
# The default value is: NO.
|
||||
|
@ -1595,8 +1717,9 @@ EXTERNAL_SEARCH = NO
|
|||
#
|
||||
# Doxygen ships with an example indexer (doxyindexer) and search engine
|
||||
# (doxysearch.cgi) which are based on the open source search engine library
|
||||
# Xapian (see: http://xapian.org/). See the section "External Indexing and
|
||||
# Searching" for details.
|
||||
# Xapian (see:
|
||||
# https://xapian.org/). See the section "External Indexing and Searching" for
|
||||
# details.
|
||||
# This tag requires that the tag SEARCHENGINE is set to YES.
|
||||
|
||||
SEARCHENGINE_URL =
|
||||
|
@ -1647,21 +1770,35 @@ LATEX_OUTPUT = latex
|
|||
# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
|
||||
# invoked.
|
||||
#
|
||||
# Note that when enabling USE_PDFLATEX this option is only used for generating
|
||||
# bitmaps for formulas in the HTML output, but not in the Makefile that is
|
||||
# written to the output directory.
|
||||
# The default file is: latex.
|
||||
# Note that when not enabling USE_PDFLATEX the default is latex when enabling
|
||||
# USE_PDFLATEX the default is pdflatex and when in the later case latex is
|
||||
# chosen this is overwritten by pdflatex. For specific output languages the
|
||||
# default can have been set differently, this depends on the implementation of
|
||||
# the output language.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
LATEX_CMD_NAME = latex
|
||||
|
||||
# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate
|
||||
# index for LaTeX.
|
||||
# Note: This tag is used in the Makefile / make.bat.
|
||||
# See also: LATEX_MAKEINDEX_CMD for the part in the generated output file
|
||||
# (.tex).
|
||||
# The default file is: makeindex.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
MAKEINDEX_CMD_NAME = makeindex
|
||||
|
||||
# The LATEX_MAKEINDEX_CMD tag can be used to specify the command name to
|
||||
# generate index for LaTeX. In case there is no backslash (\) as first character
|
||||
# it will be automatically added in the LaTeX code.
|
||||
# Note: This tag is used in the generated output file (.tex).
|
||||
# See also: MAKEINDEX_CMD_NAME for the part in the Makefile / make.bat.
|
||||
# The default value is: makeindex.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
LATEX_MAKEINDEX_CMD = makeindex
|
||||
|
||||
# If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX
|
||||
# documents. This may be useful for small projects and may help to save some
|
||||
# trees in general.
|
||||
|
@ -1746,9 +1883,11 @@ LATEX_EXTRA_FILES =
|
|||
|
||||
PDF_HYPERLINKS = NO
|
||||
|
||||
# If the USE_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate
|
||||
# the PDF file directly from the LaTeX files. Set this option to YES, to get a
|
||||
# higher quality PDF documentation.
|
||||
# If the USE_PDFLATEX tag is set to YES, doxygen will use the engine as
|
||||
# specified with LATEX_CMD_NAME to generate the PDF file directly from the LaTeX
|
||||
# files. Set this option to YES, to get a higher quality PDF documentation.
|
||||
#
|
||||
# See also section LATEX_CMD_NAME for selecting the engine.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
|
@ -1782,7 +1921,7 @@ LATEX_SOURCE_CODE = NO
|
|||
|
||||
# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
|
||||
# bibliography, e.g. plainnat, or ieeetr. See
|
||||
# http://en.wikipedia.org/wiki/BibTeX and \cite for more info.
|
||||
# https://en.wikipedia.org/wiki/BibTeX and \cite for more info.
|
||||
# The default value is: plain.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
|
@ -1796,6 +1935,14 @@ LATEX_BIB_STYLE = plain
|
|||
|
||||
LATEX_TIMESTAMP = NO
|
||||
|
||||
# The LATEX_EMOJI_DIRECTORY tag is used to specify the (relative or absolute)
|
||||
# path from which the emoji images will be read. If a relative path is entered,
|
||||
# it will be relative to the LATEX_OUTPUT directory. If left blank the
|
||||
# LATEX_OUTPUT directory will be used.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
LATEX_EMOJI_DIRECTORY =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the RTF output
|
||||
#---------------------------------------------------------------------------
|
||||
|
@ -1835,9 +1982,9 @@ COMPACT_RTF = NO
|
|||
|
||||
RTF_HYPERLINKS = NO
|
||||
|
||||
# Load stylesheet definitions from file. Syntax is similar to doxygen's config
|
||||
# file, i.e. a series of assignments. You only have to provide replacements,
|
||||
# missing definitions are set to their default value.
|
||||
# Load stylesheet definitions from file. Syntax is similar to doxygen's
|
||||
# configuration file, i.e. a series of assignments. You only have to provide
|
||||
# replacements, missing definitions are set to their default value.
|
||||
#
|
||||
# See also section "Doxygen usage" for information on how to generate the
|
||||
# default style sheet that doxygen normally uses.
|
||||
|
@ -1846,8 +1993,8 @@ RTF_HYPERLINKS = NO
|
|||
RTF_STYLESHEET_FILE =
|
||||
|
||||
# Set optional variables used in the generation of an RTF document. Syntax is
|
||||
# similar to doxygen's config file. A template extensions file can be generated
|
||||
# using doxygen -e rtf extensionFile.
|
||||
# similar to doxygen's configuration file. A template extensions file can be
|
||||
# generated using doxygen -e rtf extensionFile.
|
||||
# This tag requires that the tag GENERATE_RTF is set to YES.
|
||||
|
||||
RTF_EXTENSIONS_FILE =
|
||||
|
@ -1933,6 +2080,13 @@ XML_OUTPUT = xml
|
|||
|
||||
XML_PROGRAMLISTING = YES
|
||||
|
||||
# If the XML_NS_MEMB_FILE_SCOPE tag is set to YES, doxygen will include
|
||||
# namespace members in file scope as well, matching the HTML output.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_XML is set to YES.
|
||||
|
||||
XML_NS_MEMB_FILE_SCOPE = NO
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the DOCBOOK output
|
||||
#---------------------------------------------------------------------------
|
||||
|
@ -1965,9 +2119,9 @@ DOCBOOK_PROGRAMLISTING = NO
|
|||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an
|
||||
# AutoGen Definitions (see http://autogen.sf.net) file that captures the
|
||||
# structure of the code including all documentation. Note that this feature is
|
||||
# still experimental and incomplete at the moment.
|
||||
# AutoGen Definitions (see http://autogen.sourceforge.net/) file that captures
|
||||
# the structure of the code including all documentation. Note that this feature
|
||||
# is still experimental and incomplete at the moment.
|
||||
# The default value is: NO.
|
||||
|
||||
GENERATE_AUTOGEN_DEF = NO
|
||||
|
@ -2079,7 +2233,7 @@ PREDEFINED = U_EXPORT2= \
|
|||
U_CDECL_BEGIN= \
|
||||
U_CDECL_END= \
|
||||
"U_NAMESPACE_BEGIN=namespace icu{" \
|
||||
"U_NAMESPACE_END=}" \
|
||||
U_NAMESPACE_END=} \
|
||||
U_SHOW_CPLUSPLUS_API=1 \
|
||||
U_DEFINE_LOCAL_OPEN_POINTER()= \
|
||||
U_IN_DOXYGEN=1 \
|
||||
|
@ -2129,7 +2283,7 @@ TAGFILES =
|
|||
# tag file that is based on the input files it reads. See section "Linking to
|
||||
# external documentation" for more information about the usage of tag files.
|
||||
|
||||
GENERATE_TAGFILE = "@builddir@/doc/html/icudocs.tag"
|
||||
GENERATE_TAGFILE = @builddir@/doc/html/icudocs.tag
|
||||
|
||||
# If the ALLEXTERNALS tag is set to YES, all external class will be listed in
|
||||
# the class index. If set to NO, only the inherited external classes will be
|
||||
|
@ -2152,12 +2306,6 @@ EXTERNAL_GROUPS = YES
|
|||
|
||||
EXTERNAL_PAGES = YES
|
||||
|
||||
# The PERL_PATH should be the absolute path and name of the perl script
|
||||
# interpreter (i.e. the result of 'which perl').
|
||||
# The default file (with absolute path) is: /usr/bin/perl.
|
||||
|
||||
PERL_PATH = /usr/bin/perl
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the dot tool
|
||||
#---------------------------------------------------------------------------
|
||||
|
@ -2171,15 +2319,6 @@ PERL_PATH = /usr/bin/perl
|
|||
|
||||
CLASS_DIAGRAMS = YES
|
||||
|
||||
# You can define message sequence charts within doxygen comments using the \msc
|
||||
# command. Doxygen will then run the mscgen tool (see:
|
||||
# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the
|
||||
# documentation. The MSCGEN_PATH tag allows you to specify the directory where
|
||||
# the mscgen tool resides. If left empty the tool is assumed to be found in the
|
||||
# default search path.
|
||||
|
||||
MSCGEN_PATH =
|
||||
|
||||
# You can include diagrams made with dia in doxygen documentation. Doxygen will
|
||||
# then run dia to produce the diagram and insert it in the documentation. The
|
||||
# DIA_PATH tag allows you to specify the directory where the dia binary resides.
|
||||
|
@ -2277,10 +2416,32 @@ UML_LOOK = NO
|
|||
# but if the number exceeds 15, the total amount of fields shown is limited to
|
||||
# 10.
|
||||
# Minimum value: 0, maximum value: 100, default value: 10.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
# This tag requires that the tag UML_LOOK is set to YES.
|
||||
|
||||
UML_LIMIT_NUM_FIELDS = 10
|
||||
|
||||
# If the DOT_UML_DETAILS tag is set to NO, doxygen will show attributes and
|
||||
# methods without types and arguments in the UML graphs. If the DOT_UML_DETAILS
|
||||
# tag is set to YES, doxygen will add type and arguments for attributes and
|
||||
# methods in the UML graphs. If the DOT_UML_DETAILS tag is set to NONE, doxygen
|
||||
# will not generate fields with class member information in the UML graphs. The
|
||||
# class diagrams will look similar to the default class diagrams but using UML
|
||||
# notation for the relationships.
|
||||
# Possible values are: NO, YES and NONE.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag UML_LOOK is set to YES.
|
||||
|
||||
DOT_UML_DETAILS = NO
|
||||
|
||||
# The DOT_WRAP_THRESHOLD tag can be used to set the maximum number of characters
|
||||
# to display on a single line. If the actual line length exceeds this threshold
|
||||
# significantly it will wrapped across multiple lines. Some heuristics are apply
|
||||
# to avoid ugly line breaks.
|
||||
# Minimum value: 0, maximum value: 1000, default value: 17.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
DOT_WRAP_THRESHOLD = 17
|
||||
|
||||
# If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and
|
||||
# collaboration graphs will show the relations between templates and their
|
||||
# instances.
|
||||
|
@ -2472,9 +2633,11 @@ DOT_MULTI_TARGETS = NO
|
|||
|
||||
GENERATE_LEGEND = YES
|
||||
|
||||
# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate dot
|
||||
# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate
|
||||
# files that are used to generate the various graphs.
|
||||
#
|
||||
# Note: This setting is not only used for dot files but also for msc and
|
||||
# plantuml temporary files.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
DOT_CLEANUP = YES
|
||||
|
|
|
@ -133,7 +133,7 @@ doc/html/index.html: Doxyfile $(wildcard ./common/unicode/platform.h $(srcdir)/c
|
|||
Doxyfile: $(srcdir)/Doxyfile.in
|
||||
CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
$(DOCZIP): doc
|
||||
$(DOCZIP): doc-searchengine
|
||||
-$(RMV) $(DOCZIP)
|
||||
( cd doc/html ; zip -r ../../$(DOCZIP) * )
|
||||
endif
|
||||
|
@ -206,7 +206,7 @@ endif
|
|||
ifeq ($(DOXYGEN),)
|
||||
install-doc:
|
||||
else
|
||||
install-doc: doc
|
||||
install-doc: doc-searchengine
|
||||
$(RM) -r $(DESTDIR)$(docdir)/$(docsubdir)
|
||||
$(MKINSTALLDIRS) $(DESTDIR)$(docdir)/$(docsubdir)
|
||||
$(INSTALL_DATA) $(docfiles) $(DESTDIR)$(docdir)/$(docsubdir)
|
||||
|
|
|
@ -449,7 +449,7 @@ AC_DEFUN([AC_CHECK_64BIT_LIBS],
|
|||
AC_DEFUN([AC_CHECK_STRICT_COMPILE],
|
||||
[
|
||||
AC_MSG_CHECKING([whether strict compiling is on])
|
||||
AC_ARG_ENABLE(strict,[ --enable-strict compile with strict compiler options [default=yes]], [
|
||||
AC_ARG_ENABLE(strict,[ --disable-strict do not compile with strict compiler options], [
|
||||
if test "$enableval" = no
|
||||
then
|
||||
ac_use_strict_options=no
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<!-- This file is used to set the ICU Major Version number, which is used as a suffix on various file names in other Visual Studio projects. -->
|
||||
<PropertyGroup>
|
||||
<IcuMajorVersion>76</IcuMajorVersion>
|
||||
<IcuMajorVersion>78</IcuMajorVersion>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
|
|
@ -59,7 +59,7 @@ BreakIterator::buildInstance(const Locale& loc, const char *type, UErrorCode &st
|
|||
{
|
||||
char fnbuff[256];
|
||||
char ext[4]={'\0'};
|
||||
CharString actualLocale;
|
||||
CharString actual;
|
||||
int32_t size;
|
||||
const char16_t* brkfname = nullptr;
|
||||
UResourceBundle brkRulesStack;
|
||||
|
@ -94,7 +94,7 @@ BreakIterator::buildInstance(const Locale& loc, const char *type, UErrorCode &st
|
|||
|
||||
// Use the string if we found it
|
||||
if (U_SUCCESS(status) && brkfname) {
|
||||
actualLocale.append(ures_getLocaleInternal(brkName, &status), -1, status);
|
||||
actual.append(ures_getLocaleInternal(brkName, &status), -1, status);
|
||||
|
||||
char16_t* extStart=u_strchr(brkfname, 0x002e);
|
||||
int len = 0;
|
||||
|
@ -123,10 +123,9 @@ BreakIterator::buildInstance(const Locale& loc, const char *type, UErrorCode &st
|
|||
if (U_SUCCESS(status) && result != nullptr) {
|
||||
U_LOCALE_BASED(locBased, *(BreakIterator*)result);
|
||||
|
||||
locBased.setLocaleIDs(ures_getLocaleByType(b, ULOC_VALID_LOCALE, &status),
|
||||
actualLocale.data());
|
||||
uprv_strncpy(result->requestLocale, loc.getName(), ULOC_FULLNAME_CAPACITY);
|
||||
result->requestLocale[ULOC_FULLNAME_CAPACITY-1] = 0; // always terminate
|
||||
locBased.setLocaleIDs(ures_getLocaleByType(b, ULOC_VALID_LOCALE, &status),
|
||||
actual.data(), status);
|
||||
LocaleBased::setLocaleID(loc.getName(), result->requestLocale, status);
|
||||
}
|
||||
|
||||
ures_close(b);
|
||||
|
@ -206,26 +205,32 @@ BreakIterator::getAvailableLocales(int32_t& count)
|
|||
|
||||
BreakIterator::BreakIterator()
|
||||
{
|
||||
*validLocale = *actualLocale = *requestLocale = 0;
|
||||
}
|
||||
|
||||
BreakIterator::BreakIterator(const BreakIterator &other) : UObject(other) {
|
||||
uprv_strncpy(actualLocale, other.actualLocale, sizeof(actualLocale));
|
||||
uprv_strncpy(validLocale, other.validLocale, sizeof(validLocale));
|
||||
uprv_strncpy(requestLocale, other.requestLocale, sizeof(requestLocale));
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
U_LOCALE_BASED(locBased, *this);
|
||||
locBased.setLocaleIDs(other.validLocale, other.actualLocale, status);
|
||||
LocaleBased::setLocaleID(other.requestLocale, requestLocale, status);
|
||||
U_ASSERT(U_SUCCESS(status));
|
||||
}
|
||||
|
||||
BreakIterator &BreakIterator::operator =(const BreakIterator &other) {
|
||||
if (this != &other) {
|
||||
uprv_strncpy(actualLocale, other.actualLocale, sizeof(actualLocale));
|
||||
uprv_strncpy(validLocale, other.validLocale, sizeof(validLocale));
|
||||
uprv_strncpy(requestLocale, other.requestLocale, sizeof(requestLocale));
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
U_LOCALE_BASED(locBased, *this);
|
||||
locBased.setLocaleIDs(other.validLocale, other.actualLocale, status);
|
||||
LocaleBased::setLocaleID(other.requestLocale, requestLocale, status);
|
||||
U_ASSERT(U_SUCCESS(status));
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
BreakIterator::~BreakIterator()
|
||||
{
|
||||
delete validLocale;
|
||||
delete actualLocale;
|
||||
delete requestLocale;
|
||||
}
|
||||
|
||||
// ------------------------------------------
|
||||
|
@ -394,7 +399,7 @@ BreakIterator::createInstance(const Locale& loc, int32_t kind, UErrorCode& statu
|
|||
// revisit this in ICU 3.0 and clean it up/fix it/remove it.
|
||||
if (U_SUCCESS(status) && (result != nullptr) && *actualLoc.getName() != 0) {
|
||||
U_LOCALE_BASED(locBased, *result);
|
||||
locBased.setLocaleIDs(actualLoc.getName(), actualLoc.getName());
|
||||
locBased.setLocaleIDs(actualLoc.getName(), actualLoc.getName(), status);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -488,6 +493,7 @@ BreakIterator::makeInstance(const Locale& loc, int32_t kind, UErrorCode& status)
|
|||
}
|
||||
|
||||
if (U_FAILURE(status)) {
|
||||
delete result;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
@ -496,20 +502,25 @@ BreakIterator::makeInstance(const Locale& loc, int32_t kind, UErrorCode& status)
|
|||
|
||||
Locale
|
||||
BreakIterator::getLocale(ULocDataLocaleType type, UErrorCode& status) const {
|
||||
if (type == ULOC_REQUESTED_LOCALE) {
|
||||
return {requestLocale};
|
||||
if (U_FAILURE(status)) {
|
||||
return Locale::getRoot();
|
||||
}
|
||||
U_LOCALE_BASED(locBased, *this);
|
||||
return locBased.getLocale(type, status);
|
||||
if (type == ULOC_REQUESTED_LOCALE) {
|
||||
return requestLocale == nullptr ?
|
||||
Locale::getRoot() : Locale(requestLocale->data());
|
||||
}
|
||||
return LocaleBased::getLocale(validLocale, actualLocale, type, status);
|
||||
}
|
||||
|
||||
const char *
|
||||
BreakIterator::getLocaleID(ULocDataLocaleType type, UErrorCode& status) const {
|
||||
if (type == ULOC_REQUESTED_LOCALE) {
|
||||
return requestLocale;
|
||||
if (U_FAILURE(status)) {
|
||||
return nullptr;
|
||||
}
|
||||
U_LOCALE_BASED(locBased, *this);
|
||||
return locBased.getLocaleID(type, status);
|
||||
if (type == ULOC_REQUESTED_LOCALE) {
|
||||
return requestLocale == nullptr ? "" : requestLocale->data();
|
||||
}
|
||||
return LocaleBased::getLocaleID(validLocale, actualLocale, type, status);
|
||||
}
|
||||
|
||||
|
||||
|
@ -536,8 +547,10 @@ int32_t BreakIterator::getRuleStatusVec(int32_t *fillInVec, int32_t capacity, UE
|
|||
}
|
||||
|
||||
BreakIterator::BreakIterator (const Locale& valid, const Locale& actual) {
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
U_LOCALE_BASED(locBased, (*this));
|
||||
locBased.setLocaleIDs(valid, actual);
|
||||
locBased.setLocaleIDs(valid.getName(), actual.getName(), status);
|
||||
U_ASSERT(U_SUCCESS(status));
|
||||
}
|
||||
|
||||
U_NAMESPACE_END
|
||||
|
|
|
@ -70,6 +70,15 @@ CharString &CharString::copyFrom(const CharString &s, UErrorCode &errorCode) {
|
|||
return *this;
|
||||
}
|
||||
|
||||
CharString &CharString::copyFrom(StringPiece s, UErrorCode &errorCode) {
|
||||
if (U_FAILURE(errorCode)) {
|
||||
return *this;
|
||||
}
|
||||
len = 0;
|
||||
append(s, errorCode);
|
||||
return *this;
|
||||
}
|
||||
|
||||
int32_t CharString::lastIndexOf(char c) const {
|
||||
for(int32_t i=len; i>0;) {
|
||||
if(buffer[--i]==c) {
|
||||
|
@ -143,7 +152,7 @@ CharString &CharString::append(const char *s, int32_t sLength, UErrorCode &error
|
|||
return *this;
|
||||
}
|
||||
|
||||
CharString &CharString::appendNumber(int32_t number, UErrorCode &status) {
|
||||
CharString &CharString::appendNumber(int64_t number, UErrorCode &status) {
|
||||
if (number < 0) {
|
||||
this->append('-', status);
|
||||
if (U_FAILURE(status)) {
|
||||
|
|
|
@ -74,6 +74,7 @@ public:
|
|||
* use a UErrorCode where memory allocations might be needed.
|
||||
*/
|
||||
CharString ©From(const CharString &other, UErrorCode &errorCode);
|
||||
CharString ©From(StringPiece s, UErrorCode &errorCode);
|
||||
|
||||
UBool isEmpty() const { return len==0; }
|
||||
int32_t length() const { return len; }
|
||||
|
@ -135,7 +136,7 @@ public:
|
|||
}
|
||||
CharString &append(const char *s, int32_t sLength, UErrorCode &status);
|
||||
|
||||
CharString &appendNumber(int32_t number, UErrorCode &status);
|
||||
CharString &appendNumber(int64_t number, UErrorCode &status);
|
||||
|
||||
/**
|
||||
* Returns a writable buffer for appending and writes the buffer's capacity to
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -12,44 +12,84 @@
|
|||
*/
|
||||
#include "locbased.h"
|
||||
#include "cstring.h"
|
||||
#include "charstr.h"
|
||||
|
||||
U_NAMESPACE_BEGIN
|
||||
|
||||
Locale LocaleBased::getLocale(ULocDataLocaleType type, UErrorCode& status) const {
|
||||
const char* id = getLocaleID(type, status);
|
||||
Locale LocaleBased::getLocale(const CharString* valid, const CharString* actual,
|
||||
ULocDataLocaleType type, UErrorCode& status) {
|
||||
const char* id = getLocaleID(valid, actual, type, status);
|
||||
return Locale(id != nullptr ? id : "");
|
||||
}
|
||||
|
||||
const char* LocaleBased::getLocaleID(ULocDataLocaleType type, UErrorCode& status) const {
|
||||
const char* LocaleBased::getLocaleID(const CharString* valid, const CharString* actual,
|
||||
ULocDataLocaleType type, UErrorCode& status) {
|
||||
if (U_FAILURE(status)) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
switch(type) {
|
||||
case ULOC_VALID_LOCALE:
|
||||
return valid;
|
||||
return valid == nullptr ? "" : valid->data();
|
||||
case ULOC_ACTUAL_LOCALE:
|
||||
return actual;
|
||||
return actual == nullptr ? "" : actual->data();
|
||||
default:
|
||||
status = U_ILLEGAL_ARGUMENT_ERROR;
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
void LocaleBased::setLocaleIDs(const char* validID, const char* actualID) {
|
||||
if (validID != nullptr) {
|
||||
uprv_strncpy(valid, validID, ULOC_FULLNAME_CAPACITY);
|
||||
valid[ULOC_FULLNAME_CAPACITY-1] = 0; // always terminate
|
||||
}
|
||||
if (actualID != nullptr) {
|
||||
uprv_strncpy(actual, actualID, ULOC_FULLNAME_CAPACITY);
|
||||
actual[ULOC_FULLNAME_CAPACITY-1] = 0; // always terminate
|
||||
void LocaleBased::setLocaleIDs(const CharString* validID, const CharString* actualID, UErrorCode& status) {
|
||||
setValidLocaleID(validID, status);
|
||||
setActualLocaleID(actualID,status);
|
||||
}
|
||||
void LocaleBased::setLocaleIDs(const char* validID, const char* actualID, UErrorCode& status) {
|
||||
setValidLocaleID(validID, status);
|
||||
setActualLocaleID(actualID,status);
|
||||
}
|
||||
|
||||
void LocaleBased::setLocaleID(const char* id, CharString*& dest, UErrorCode& status) {
|
||||
if (U_FAILURE(status)) { return; }
|
||||
if (id == nullptr || *id == 0) {
|
||||
delete dest;
|
||||
dest = nullptr;
|
||||
} else {
|
||||
if (dest == nullptr) {
|
||||
dest = new CharString(id, status);
|
||||
if (dest == nullptr) {
|
||||
status = U_MEMORY_ALLOCATION_ERROR;
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
dest->copyFrom(id, status);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LocaleBased::setLocaleIDs(const Locale& validID, const Locale& actualID) {
|
||||
uprv_strcpy(valid, validID.getName());
|
||||
uprv_strcpy(actual, actualID.getName());
|
||||
void LocaleBased::setLocaleID(const CharString* id, CharString*& dest, UErrorCode& status) {
|
||||
if (U_FAILURE(status)) { return; }
|
||||
if (id == nullptr || id->isEmpty()) {
|
||||
delete dest;
|
||||
dest = nullptr;
|
||||
} else {
|
||||
if (dest == nullptr) {
|
||||
dest = new CharString(*id, status);
|
||||
if (dest == nullptr) {
|
||||
status = U_MEMORY_ALLOCATION_ERROR;
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
dest->copyFrom(*id, status);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool LocaleBased::equalIDs(const CharString* left, const CharString* right) {
|
||||
// true if both are nullptr
|
||||
if (left == nullptr && right == nullptr) return true;
|
||||
// false if only one is nullptr
|
||||
if (left == nullptr || right == nullptr) return false;
|
||||
return *left == *right;
|
||||
}
|
||||
|
||||
U_NAMESPACE_END
|
||||
|
|
|
@ -19,13 +19,14 @@
|
|||
/**
|
||||
* Macro to declare a locale LocaleBased wrapper object for the given
|
||||
* object, which must have two members named `validLocale' and
|
||||
* `actualLocale' of size ULOC_FULLNAME_CAPACITY
|
||||
* `actualLocale' of which are pointers to the internal icu::CharString.
|
||||
*/
|
||||
#define U_LOCALE_BASED(varname, objname) \
|
||||
LocaleBased varname((objname).validLocale, (objname).actualLocale)
|
||||
|
||||
U_NAMESPACE_BEGIN
|
||||
|
||||
class CharString;
|
||||
/**
|
||||
* A utility class that unifies the implementation of getLocale() by
|
||||
* various ICU services. This class is likely to be removed in the
|
||||
|
@ -41,33 +42,35 @@ class U_COMMON_API LocaleBased : public UMemory {
|
|||
* Construct a LocaleBased wrapper around the two pointers. These
|
||||
* will be aliased for the lifetime of this object.
|
||||
*/
|
||||
inline LocaleBased(char* validAlias, char* actualAlias);
|
||||
|
||||
/**
|
||||
* Construct a LocaleBased wrapper around the two const pointers.
|
||||
* These will be aliased for the lifetime of this object.
|
||||
*/
|
||||
inline LocaleBased(const char* validAlias, const char* actualAlias);
|
||||
inline LocaleBased(CharString*& validAlias, CharString*& actualAlias);
|
||||
|
||||
/**
|
||||
* Return locale meta-data for the service object wrapped by this
|
||||
* object. Either the valid or the actual locale may be
|
||||
* retrieved.
|
||||
* @param valid The valid locale.
|
||||
* @param actual The actual locale.
|
||||
* @param type either ULOC_VALID_LOCALE or ULOC_ACTUAL_LOCALE
|
||||
* @param status input-output error code
|
||||
* @return the indicated locale
|
||||
*/
|
||||
Locale getLocale(ULocDataLocaleType type, UErrorCode& status) const;
|
||||
static Locale getLocale(
|
||||
const CharString* valid, const CharString* actual,
|
||||
ULocDataLocaleType type, UErrorCode& status);
|
||||
|
||||
/**
|
||||
* Return the locale ID for the service object wrapped by this
|
||||
* object. Either the valid or the actual locale may be
|
||||
* retrieved.
|
||||
* @param valid The valid locale.
|
||||
* @param actual The actual locale.
|
||||
* @param type either ULOC_VALID_LOCALE or ULOC_ACTUAL_LOCALE
|
||||
* @param status input-output error code
|
||||
* @return the indicated locale ID
|
||||
*/
|
||||
const char* getLocaleID(ULocDataLocaleType type, UErrorCode& status) const;
|
||||
static const char* getLocaleID(
|
||||
const CharString* valid, const CharString* actual,
|
||||
ULocDataLocaleType type, UErrorCode& status);
|
||||
|
||||
/**
|
||||
* Set the locale meta-data for the service object wrapped by this
|
||||
|
@ -75,31 +78,40 @@ class U_COMMON_API LocaleBased : public UMemory {
|
|||
* @param valid the ID of the valid locale
|
||||
* @param actual the ID of the actual locale
|
||||
*/
|
||||
void setLocaleIDs(const char* valid, const char* actual);
|
||||
void setLocaleIDs(const char* valid, const char* actual, UErrorCode& status);
|
||||
void setLocaleIDs(const CharString* valid, const CharString* actual, UErrorCode& status);
|
||||
|
||||
/**
|
||||
* Set the locale meta-data for the service object wrapped by this
|
||||
* object.
|
||||
* @param valid the ID of the valid locale
|
||||
* @param actual the ID of the actual locale
|
||||
*/
|
||||
void setLocaleIDs(const Locale& valid, const Locale& actual);
|
||||
static void setLocaleID(const char* id, CharString*& dest, UErrorCode& status);
|
||||
static void setLocaleID(const CharString* id, CharString*& dest, UErrorCode& status);
|
||||
|
||||
static bool equalIDs(const CharString* left, const CharString* right);
|
||||
|
||||
private:
|
||||
|
||||
char* valid;
|
||||
|
||||
char* actual;
|
||||
void setValidLocaleID(const CharString* id, UErrorCode& status);
|
||||
void setActualLocaleID(const CharString* id, UErrorCode& status);
|
||||
void setValidLocaleID(const char* id, UErrorCode& status);
|
||||
void setActualLocaleID(const char* id, UErrorCode& status);
|
||||
|
||||
CharString*& valid;
|
||||
CharString*& actual;
|
||||
};
|
||||
|
||||
inline LocaleBased::LocaleBased(char* validAlias, char* actualAlias) :
|
||||
inline LocaleBased::LocaleBased(CharString*& validAlias, CharString*& actualAlias) :
|
||||
valid(validAlias), actual(actualAlias) {
|
||||
}
|
||||
|
||||
inline LocaleBased::LocaleBased(const char* validAlias,
|
||||
const char* actualAlias) :
|
||||
// ugh: cast away const
|
||||
valid(const_cast<char*>(validAlias)), actual(const_cast<char*>(actualAlias)) {
|
||||
inline void LocaleBased::setValidLocaleID(const CharString* id, UErrorCode& status) {
|
||||
setLocaleID(id, valid, status);
|
||||
}
|
||||
inline void LocaleBased::setActualLocaleID(const CharString* id, UErrorCode& status) {
|
||||
setLocaleID(id, actual, status);
|
||||
}
|
||||
inline void LocaleBased::setValidLocaleID(const char* id, UErrorCode& status) {
|
||||
setLocaleID(id, valid, status);
|
||||
}
|
||||
inline void LocaleBased::setActualLocaleID(const char* id, UErrorCode& status) {
|
||||
setLocaleID(id, actual, status);
|
||||
}
|
||||
|
||||
U_NAMESPACE_END
|
||||
|
|
|
@ -19,6 +19,8 @@
|
|||
* that then do not depend on resource bundle code and display name data.
|
||||
*/
|
||||
|
||||
#include <string_view>
|
||||
|
||||
#include "unicode/utypes.h"
|
||||
#include "unicode/brkiter.h"
|
||||
#include "unicode/locid.h"
|
||||
|
@ -359,7 +361,7 @@ _getStringOrCopyKey(const char *path, const char *locale,
|
|||
return u_terminateUChars(dest, destCapacity, length, &errorCode);
|
||||
}
|
||||
|
||||
using UDisplayNameGetter = icu::CharString(const char*, UErrorCode&);
|
||||
using UDisplayNameGetter = icu::CharString(std::string_view, UErrorCode&);
|
||||
|
||||
int32_t
|
||||
_getDisplayNameForComponent(const char *locale,
|
||||
|
@ -377,6 +379,10 @@ _getDisplayNameForComponent(const char *locale,
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (locale == nullptr) {
|
||||
locale = uloc_getDefault();
|
||||
}
|
||||
|
||||
localStatus = U_ZERO_ERROR;
|
||||
icu::CharString localeBuffer = (*getter)(locale, localStatus);
|
||||
if (U_FAILURE(localStatus)) {
|
||||
|
|
|
@ -1828,8 +1828,13 @@ ulocimp_isCanonicalizedLocaleForTest(const char* localeName)
|
|||
|
||||
U_NAMESPACE_BEGIN
|
||||
|
||||
/*This function initializes a Locale from a C locale ID*/
|
||||
Locale& Locale::init(const char* localeID, UBool canonicalize)
|
||||
{
|
||||
return localeID == nullptr ? *this = getDefault() : init(StringPiece{localeID}, canonicalize);
|
||||
}
|
||||
|
||||
/*This function initializes a Locale from a C locale ID*/
|
||||
Locale& Locale::init(StringPiece localeID, UBool canonicalize)
|
||||
{
|
||||
fIsBogus = false;
|
||||
/* Free our current storage */
|
||||
|
@ -1854,19 +1859,28 @@ Locale& Locale::init(const char* localeID, UBool canonicalize)
|
|||
int32_t length;
|
||||
UErrorCode err;
|
||||
|
||||
if(localeID == nullptr) {
|
||||
// not an error, just set the default locale
|
||||
return *this = getDefault();
|
||||
}
|
||||
|
||||
/* preset all fields to empty */
|
||||
language[0] = script[0] = country[0] = 0;
|
||||
|
||||
const auto parse = [canonicalize](std::string_view localeID,
|
||||
char* name,
|
||||
int32_t nameCapacity,
|
||||
UErrorCode& status) {
|
||||
return ByteSinkUtil::viaByteSinkToTerminatedChars(
|
||||
name, nameCapacity,
|
||||
[&](ByteSink& sink, UErrorCode& status) {
|
||||
if (canonicalize) {
|
||||
ulocimp_canonicalize(localeID, sink, status);
|
||||
} else {
|
||||
ulocimp_getName(localeID, sink, status);
|
||||
}
|
||||
},
|
||||
status);
|
||||
};
|
||||
|
||||
// "canonicalize" the locale ID to ICU/Java format
|
||||
err = U_ZERO_ERROR;
|
||||
length = canonicalize ?
|
||||
uloc_canonicalize(localeID, fullName, sizeof(fullNameBuffer), &err) :
|
||||
uloc_getName(localeID, fullName, sizeof(fullNameBuffer), &err);
|
||||
length = parse(localeID, fullName, sizeof fullNameBuffer, err);
|
||||
|
||||
if (err == U_BUFFER_OVERFLOW_ERROR || length >= static_cast<int32_t>(sizeof(fullNameBuffer))) {
|
||||
U_ASSERT(baseName == nullptr);
|
||||
|
@ -1877,9 +1891,7 @@ Locale& Locale::init(const char* localeID, UBool canonicalize)
|
|||
}
|
||||
fullName = newFullName;
|
||||
err = U_ZERO_ERROR;
|
||||
length = canonicalize ?
|
||||
uloc_canonicalize(localeID, fullName, length+1, &err) :
|
||||
uloc_getName(localeID, fullName, length+1, &err);
|
||||
length = parse(localeID, fullName, length + 1, err);
|
||||
}
|
||||
if(U_FAILURE(err) || err == U_STRING_NOT_TERMINATED_WARNING) {
|
||||
/* should never occur */
|
||||
|
@ -2200,6 +2212,13 @@ Locale::createFromName (const char *name)
|
|||
}
|
||||
}
|
||||
|
||||
Locale U_EXPORT2
|
||||
Locale::createFromName(StringPiece name) {
|
||||
Locale loc("");
|
||||
loc.init(name, false);
|
||||
return loc;
|
||||
}
|
||||
|
||||
Locale U_EXPORT2
|
||||
Locale::createCanonical(const char* name) {
|
||||
Locale loc("");
|
||||
|
|
|
@ -300,6 +300,9 @@ ulocimp_addLikelySubtags(const char* localeID,
|
|||
icu::ByteSink& sink,
|
||||
UErrorCode& status) {
|
||||
if (U_FAILURE(status)) { return; }
|
||||
if (localeID == nullptr) {
|
||||
localeID = uloc_getDefault();
|
||||
}
|
||||
icu::CharString localeBuffer = ulocimp_canonicalize(localeID, status);
|
||||
_uloc_addLikelySubtags(localeBuffer.data(), sink, status);
|
||||
}
|
||||
|
@ -334,6 +337,9 @@ ulocimp_minimizeSubtags(const char* localeID,
|
|||
bool favorScript,
|
||||
UErrorCode& status) {
|
||||
if (U_FAILURE(status)) { return; }
|
||||
if (localeID == nullptr) {
|
||||
localeID = uloc_getDefault();
|
||||
}
|
||||
icu::CharString localeBuffer = ulocimp_canonicalize(localeID, status);
|
||||
_uloc_minimizeSubtags(localeBuffer.data(), sink, favorScript, status);
|
||||
}
|
||||
|
@ -349,7 +355,9 @@ uloc_isRightToLeft(const char *locale) {
|
|||
UErrorCode errorCode = U_ZERO_ERROR;
|
||||
icu::CharString lang;
|
||||
icu::CharString script;
|
||||
ulocimp_getSubtags(locale, &lang, &script, nullptr, nullptr, nullptr, errorCode);
|
||||
ulocimp_getSubtags(
|
||||
locale == nullptr ? uloc_getDefault() : locale,
|
||||
&lang, &script, nullptr, nullptr, nullptr, errorCode);
|
||||
if (U_FAILURE(errorCode) || script.isEmpty()) {
|
||||
// Fastpath: We know the likely scripts and their writing direction
|
||||
// for some common languages.
|
||||
|
@ -369,7 +377,7 @@ uloc_isRightToLeft(const char *locale) {
|
|||
if (U_FAILURE(errorCode)) {
|
||||
return false;
|
||||
}
|
||||
ulocimp_getSubtags(likely.data(), nullptr, &script, nullptr, nullptr, nullptr, errorCode);
|
||||
ulocimp_getSubtags(likely.toStringPiece(), nullptr, &script, nullptr, nullptr, nullptr, errorCode);
|
||||
if (U_FAILURE(errorCode) || script.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
|
@ -430,7 +438,7 @@ ulocimp_getRegionForSupplementalData(const char *localeID, bool inferRegion,
|
|||
icu::CharString rgBuf = GetRegionFromKey(localeID, "rg", status);
|
||||
if (U_SUCCESS(status) && rgBuf.isEmpty()) {
|
||||
// No valid rg keyword value, try for unicode_region_subtag
|
||||
rgBuf = ulocimp_getRegion(localeID, status);
|
||||
rgBuf = ulocimp_getRegion(localeID == nullptr ? uloc_getDefault() : localeID, status);
|
||||
if (U_SUCCESS(status) && rgBuf.isEmpty() && inferRegion) {
|
||||
// Second check for sd keyword value
|
||||
rgBuf = GetRegionFromKey(localeID, "sd", status);
|
||||
|
@ -439,7 +447,7 @@ ulocimp_getRegionForSupplementalData(const char *localeID, bool inferRegion,
|
|||
UErrorCode rgStatus = U_ZERO_ERROR;
|
||||
icu::CharString locBuf = ulocimp_addLikelySubtags(localeID, rgStatus);
|
||||
if (U_SUCCESS(rgStatus)) {
|
||||
rgBuf = ulocimp_getRegion(locBuf.data(), status);
|
||||
rgBuf = ulocimp_getRegion(locBuf.toStringPiece(), status);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -527,7 +527,7 @@ LSR LikelySubtags::makeMaximizedLsrFrom(const Locale &locale,
|
|||
return {};
|
||||
}
|
||||
const char *name = locale.getName();
|
||||
if (uprv_isAtSign(name[0]) && name[1] == 'x' && name[2] == '=') { // name.startsWith("@x=")
|
||||
if (!returnInputIfUnmatch && uprv_isAtSign(name[0]) && name[1] == 'x' && name[2] == '=') { // name.startsWith("@x=")
|
||||
// Private use language tag x-subtag-subtag... which CLDR changes to
|
||||
// und-x-subtag-subtag...
|
||||
return LSR(name, "", "", LSR::EXPLICIT_LSR);
|
||||
|
@ -715,13 +715,29 @@ LSR LikelySubtags::maximize(StringPiece language, StringPiece script, StringPiec
|
|||
} else {
|
||||
iter.resetToState64(state);
|
||||
value = trieNext(iter, "", 0);
|
||||
U_ASSERT(value > 0);
|
||||
U_ASSERT(value != 0);
|
||||
// For the case of und_Latn
|
||||
if (value < 0) {
|
||||
retainLanguage = !language.empty();
|
||||
retainScript = !script.empty();
|
||||
retainRegion = !region.empty();
|
||||
// Fallback to und_$region =>
|
||||
iter.resetToState64(trieUndState); // "und" ("*")
|
||||
value = trieNext(iter, "", 0);
|
||||
U_ASSERT(value == 0);
|
||||
int64_t trieUndEmptyState = iter.getState64();
|
||||
value = trieNext(iter, region, 0);
|
||||
// Fallback to und =>
|
||||
if (value < 0) {
|
||||
iter.resetToState64(trieUndEmptyState);
|
||||
value = trieNext(iter, "", 0);
|
||||
U_ASSERT(value > 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
U_ASSERT(value < lsrsLength);
|
||||
const LSR &matched = lsrs[value];
|
||||
|
||||
if (returnInputIfUnmatch &&
|
||||
(!(matchLanguage || matchScript || (matchRegion && language.empty())))) {
|
||||
return LSR("", "", "", LSR::EXPLICIT_LSR, errorCode); // no matching.
|
||||
|
@ -731,18 +747,23 @@ LSR LikelySubtags::maximize(StringPiece language, StringPiece script, StringPiec
|
|||
}
|
||||
|
||||
if (!(retainLanguage || retainScript || retainRegion)) {
|
||||
U_ASSERT(value >= 0);
|
||||
// Quickly return a copy of the lookup-result LSR
|
||||
// without new allocation of the subtags.
|
||||
const LSR &matched = lsrs[value];
|
||||
return LSR(matched.language, matched.script, matched.region, matched.flags);
|
||||
}
|
||||
if (!retainLanguage) {
|
||||
language = matched.language;
|
||||
U_ASSERT(value >= 0);
|
||||
language = lsrs[value].language;
|
||||
}
|
||||
if (!retainScript) {
|
||||
script = matched.script;
|
||||
U_ASSERT(value >= 0);
|
||||
script = lsrs[value].script;
|
||||
}
|
||||
if (!retainRegion) {
|
||||
region = matched.region;
|
||||
U_ASSERT(value >= 0);
|
||||
region = lsrs[value].region;
|
||||
}
|
||||
int32_t retainMask = (retainLanguage ? 4 : 0) + (retainScript ? 2 : 0) + (retainRegion ? 1 : 0);
|
||||
// retainOldMask flags = LSR explicit-subtag flags
|
||||
|
|
|
@ -161,6 +161,9 @@ _uloc_getOrientationHelper(const char* localeId,
|
|||
|
||||
if (U_FAILURE(status)) { return result; }
|
||||
|
||||
if (localeId == nullptr) {
|
||||
localeId = uloc_getDefault();
|
||||
}
|
||||
icu::CharString localeBuffer = ulocimp_canonicalize(localeId, status);
|
||||
|
||||
if (U_FAILURE(status)) { return result; }
|
||||
|
|
|
@ -193,7 +193,7 @@ u_strToPunycode(const char16_t *src, int32_t srcLength,
|
|||
return 0;
|
||||
}
|
||||
|
||||
if(src==nullptr || srcLength<-1 || (dest==nullptr && destCapacity!=0)) {
|
||||
if(src==nullptr || srcLength<-1 || destCapacity<0 || (dest==nullptr && destCapacity!=0)) {
|
||||
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -76,7 +76,7 @@
|
|||
#include <float.h>
|
||||
|
||||
#ifndef U_COMMON_IMPLEMENTATION
|
||||
#error U_COMMON_IMPLEMENTATION not set - must be set for all ICU source files in common/ - see https://unicode-org.github.io/icu/userguide/howtouseicu
|
||||
#error U_COMMON_IMPLEMENTATION not set - must be set for all ICU source files in common/ - see https://unicode-org.github.io/icu/userguide/icu/howtouseicu.html
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -47,7 +47,10 @@ static int gLastSerial = 0;
|
|||
// Constructor. Just set the fields to reasonable default values.
|
||||
//
|
||||
//-------------------------------------------------------------------------
|
||||
RBBINode::RBBINode(NodeType t) : UMemory() {
|
||||
RBBINode::RBBINode(NodeType t, UErrorCode& status) : UMemory() {
|
||||
if (U_FAILURE(status)) {
|
||||
return;
|
||||
}
|
||||
#ifdef RBBI_DEBUG
|
||||
fSerialNum = ++gLastSerial;
|
||||
#endif
|
||||
|
@ -65,10 +68,13 @@ RBBINode::RBBINode(NodeType t) : UMemory() {
|
|||
fVal = 0;
|
||||
fPrecedence = precZero;
|
||||
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
fFirstPosSet = new UVector(status); // TODO - get a real status from somewhere
|
||||
fFirstPosSet = new UVector(status);
|
||||
fLastPosSet = new UVector(status);
|
||||
fFollowPos = new UVector(status);
|
||||
if (U_SUCCESS(status) &&
|
||||
(fFirstPosSet == nullptr || fLastPosSet == nullptr || fFollowPos == nullptr)) {
|
||||
status = U_MEMORY_ALLOCATION_ERROR;
|
||||
}
|
||||
if (t==opCat) {fPrecedence = precOpCat;}
|
||||
else if (t==opOr) {fPrecedence = precOpOr;}
|
||||
else if (t==opStart) {fPrecedence = precStart;}
|
||||
|
@ -77,7 +83,10 @@ RBBINode::RBBINode(NodeType t) : UMemory() {
|
|||
}
|
||||
|
||||
|
||||
RBBINode::RBBINode(const RBBINode &other) : UMemory(other) {
|
||||
RBBINode::RBBINode(const RBBINode &other, UErrorCode& status) : UMemory(other) {
|
||||
if (U_FAILURE(status)) {
|
||||
return;
|
||||
}
|
||||
#ifdef RBBI_DEBUG
|
||||
fSerialNum = ++gLastSerial;
|
||||
#endif
|
||||
|
@ -94,10 +103,13 @@ RBBINode::RBBINode(const RBBINode &other) : UMemory(other) {
|
|||
fVal = other.fVal;
|
||||
fRuleRoot = false;
|
||||
fChainIn = other.fChainIn;
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
fFirstPosSet = new UVector(status); // TODO - get a real status from somewhere
|
||||
fLastPosSet = new UVector(status);
|
||||
fFollowPos = new UVector(status);
|
||||
if (U_SUCCESS(status) &&
|
||||
(fFirstPosSet == nullptr || fLastPosSet == nullptr || fFollowPos == nullptr)) {
|
||||
status = U_MEMORY_ALLOCATION_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -193,27 +205,54 @@ void RBBINode::NRDeleteNode(RBBINode *node) {
|
|||
// references in preparation for generating the DFA tables.
|
||||
//
|
||||
//-------------------------------------------------------------------------
|
||||
RBBINode *RBBINode::cloneTree() {
|
||||
constexpr int kRecursiveDepthLimit = 3500;
|
||||
RBBINode *RBBINode::cloneTree(UErrorCode &status, int depth) {
|
||||
if (U_FAILURE(status)) {
|
||||
return nullptr;
|
||||
}
|
||||
// If the depth of the stack is too deep, we return U_INPUT_TOO_LONG_ERROR
|
||||
// to avoid stack overflow crash.
|
||||
if (depth > kRecursiveDepthLimit) {
|
||||
status = U_INPUT_TOO_LONG_ERROR;
|
||||
return nullptr;
|
||||
}
|
||||
RBBINode *n;
|
||||
|
||||
if (fType == RBBINode::varRef) {
|
||||
// If the current node is a variable reference, skip over it
|
||||
// and clone the definition of the variable instead.
|
||||
n = fLeftChild->cloneTree();
|
||||
n = fLeftChild->cloneTree(status, depth+1);
|
||||
if (U_FAILURE(status)) {
|
||||
return nullptr;
|
||||
}
|
||||
} else if (fType == RBBINode::uset) {
|
||||
n = this;
|
||||
} else {
|
||||
n = new RBBINode(*this);
|
||||
n = new RBBINode(*this, status);
|
||||
if (U_FAILURE(status)) {
|
||||
delete n;
|
||||
return nullptr;
|
||||
}
|
||||
// Check for null pointer.
|
||||
if (n != nullptr) {
|
||||
if (fLeftChild != nullptr) {
|
||||
n->fLeftChild = fLeftChild->cloneTree();
|
||||
n->fLeftChild->fParent = n;
|
||||
if (n == nullptr) {
|
||||
status = U_MEMORY_ALLOCATION_ERROR;
|
||||
return nullptr;
|
||||
}
|
||||
if (fLeftChild != nullptr) {
|
||||
n->fLeftChild = fLeftChild->cloneTree(status, depth+1);
|
||||
if (U_FAILURE(status)) {
|
||||
delete n;
|
||||
return nullptr;
|
||||
}
|
||||
if (fRightChild != nullptr) {
|
||||
n->fRightChild = fRightChild->cloneTree();
|
||||
n->fRightChild->fParent = n;
|
||||
n->fLeftChild->fParent = n;
|
||||
}
|
||||
if (fRightChild != nullptr) {
|
||||
n->fRightChild = fRightChild->cloneTree(status, depth+1);
|
||||
if (U_FAILURE(status)) {
|
||||
delete n;
|
||||
return nullptr;
|
||||
}
|
||||
n->fRightChild->fParent = n;
|
||||
}
|
||||
}
|
||||
return n;
|
||||
|
@ -239,7 +278,6 @@ RBBINode *RBBINode::cloneTree() {
|
|||
// nested references are handled by cloneTree(), not here.
|
||||
//
|
||||
//-------------------------------------------------------------------------
|
||||
constexpr int kRecursiveDepthLimit = 3500;
|
||||
RBBINode *RBBINode::flattenVariables(UErrorCode& status, int depth) {
|
||||
if (U_FAILURE(status)) {
|
||||
return this;
|
||||
|
@ -251,21 +289,34 @@ RBBINode *RBBINode::flattenVariables(UErrorCode& status, int depth) {
|
|||
return this;
|
||||
}
|
||||
if (fType == varRef) {
|
||||
RBBINode *retNode = fLeftChild->cloneTree();
|
||||
if (retNode != nullptr) {
|
||||
retNode->fRuleRoot = this->fRuleRoot;
|
||||
retNode->fChainIn = this->fChainIn;
|
||||
RBBINode *retNode = fLeftChild->cloneTree(status, depth+1);
|
||||
if (U_FAILURE(status)) {
|
||||
return this;
|
||||
}
|
||||
retNode->fRuleRoot = this->fRuleRoot;
|
||||
retNode->fChainIn = this->fChainIn;
|
||||
delete this; // TODO: undefined behavior. Fix.
|
||||
return retNode;
|
||||
}
|
||||
|
||||
if (fLeftChild != nullptr) {
|
||||
fLeftChild = fLeftChild->flattenVariables(status, depth+1);
|
||||
if (fLeftChild == nullptr) {
|
||||
status = U_MEMORY_ALLOCATION_ERROR;
|
||||
}
|
||||
if (U_FAILURE(status)) {
|
||||
return this;
|
||||
}
|
||||
fLeftChild->fParent = this;
|
||||
}
|
||||
if (fRightChild != nullptr) {
|
||||
fRightChild = fRightChild->flattenVariables(status, depth+1);
|
||||
if (fRightChild == nullptr) {
|
||||
status = U_MEMORY_ALLOCATION_ERROR;
|
||||
}
|
||||
if (U_FAILURE(status)) {
|
||||
return this;
|
||||
}
|
||||
fRightChild->fParent = this;
|
||||
}
|
||||
return this;
|
||||
|
@ -280,7 +331,16 @@ RBBINode *RBBINode::flattenVariables(UErrorCode& status, int depth) {
|
|||
// the left child of the uset node.
|
||||
//
|
||||
//-------------------------------------------------------------------------
|
||||
void RBBINode::flattenSets() {
|
||||
void RBBINode::flattenSets(UErrorCode &status, int depth) {
|
||||
if (U_FAILURE(status)) {
|
||||
return;
|
||||
}
|
||||
// If the depth of the stack is too deep, we return U_INPUT_TOO_LONG_ERROR
|
||||
// to avoid stack overflow crash.
|
||||
if (depth > kRecursiveDepthLimit) {
|
||||
status = U_INPUT_TOO_LONG_ERROR;
|
||||
return;
|
||||
}
|
||||
U_ASSERT(fType != setRef);
|
||||
|
||||
if (fLeftChild != nullptr) {
|
||||
|
@ -288,11 +348,15 @@ void RBBINode::flattenSets() {
|
|||
RBBINode *setRefNode = fLeftChild;
|
||||
RBBINode *usetNode = setRefNode->fLeftChild;
|
||||
RBBINode *replTree = usetNode->fLeftChild;
|
||||
fLeftChild = replTree->cloneTree();
|
||||
fLeftChild = replTree->cloneTree(status, depth+1);
|
||||
if (U_FAILURE(status)) {
|
||||
delete setRefNode;
|
||||
return;
|
||||
}
|
||||
fLeftChild->fParent = this;
|
||||
delete setRefNode;
|
||||
} else {
|
||||
fLeftChild->flattenSets();
|
||||
fLeftChild->flattenSets(status, depth+1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -301,11 +365,15 @@ void RBBINode::flattenSets() {
|
|||
RBBINode *setRefNode = fRightChild;
|
||||
RBBINode *usetNode = setRefNode->fLeftChild;
|
||||
RBBINode *replTree = usetNode->fLeftChild;
|
||||
fRightChild = replTree->cloneTree();
|
||||
fRightChild = replTree->cloneTree(status, depth+1);
|
||||
if (U_FAILURE(status)) {
|
||||
delete setRefNode;
|
||||
return;
|
||||
}
|
||||
fRightChild->fParent = this;
|
||||
delete setRefNode;
|
||||
} else {
|
||||
fRightChild->flattenSets();
|
||||
fRightChild->flattenSets(status, depth+1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -91,14 +91,14 @@ class RBBINode : public UMemory {
|
|||
UVector *fFollowPos;
|
||||
|
||||
|
||||
RBBINode(NodeType t);
|
||||
RBBINode(const RBBINode &other);
|
||||
RBBINode(NodeType t, UErrorCode& status);
|
||||
RBBINode(const RBBINode &other, UErrorCode& status);
|
||||
~RBBINode();
|
||||
static void NRDeleteNode(RBBINode *node);
|
||||
|
||||
RBBINode *cloneTree();
|
||||
RBBINode *cloneTree(UErrorCode &status, int depth=0);
|
||||
RBBINode *flattenVariables(UErrorCode &status, int depth=0);
|
||||
void flattenSets();
|
||||
void flattenSets(UErrorCode &status, int depth=0);
|
||||
void findNodes(UVector *dest, RBBINode::NodeType kind, UErrorCode &status);
|
||||
|
||||
#ifdef RBBI_DEBUG
|
||||
|
|
|
@ -767,15 +767,24 @@ void RBBIRuleScanner::findSetFor(const UnicodeString &s, RBBINode *node, Unicode
|
|||
c = s.char32At(0);
|
||||
setToAdopt = new UnicodeSet(c, c);
|
||||
}
|
||||
if (setToAdopt == nullptr) {
|
||||
error(U_MEMORY_ALLOCATION_ERROR);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Make a new uset node to refer to this UnicodeSet
|
||||
// This new uset node becomes the child of the caller's setReference node.
|
||||
//
|
||||
RBBINode *usetNode = new RBBINode(RBBINode::uset);
|
||||
UErrorCode localStatus = U_ZERO_ERROR;
|
||||
RBBINode *usetNode = new RBBINode(RBBINode::uset, localStatus);
|
||||
if (usetNode == nullptr) {
|
||||
error(U_MEMORY_ALLOCATION_ERROR);
|
||||
localStatus = U_MEMORY_ALLOCATION_ERROR;
|
||||
}
|
||||
if (U_FAILURE(localStatus)) {
|
||||
delete usetNode;
|
||||
error(localStatus);
|
||||
delete setToAdopt;
|
||||
return;
|
||||
}
|
||||
|
@ -1191,7 +1200,7 @@ RBBINode *RBBIRuleScanner::pushNewNode(RBBINode::NodeType t) {
|
|||
return nullptr;
|
||||
}
|
||||
fNodeStackPtr++;
|
||||
fNodeStack[fNodeStackPtr] = new RBBINode(t);
|
||||
fNodeStack[fNodeStackPtr] = new RBBINode(t, *fRB->fStatus);
|
||||
if (fNodeStack[fNodeStackPtr] == nullptr) {
|
||||
*fRB->fStatus = U_MEMORY_ALLOCATION_ERROR;
|
||||
}
|
||||
|
|
|
@ -375,7 +375,11 @@ void RBBISetBuilder::addValToSets(UVector *sets, uint32_t val) {
|
|||
}
|
||||
|
||||
void RBBISetBuilder::addValToSet(RBBINode *usetNode, uint32_t val) {
|
||||
RBBINode *leafNode = new RBBINode(RBBINode::leafChar);
|
||||
RBBINode *leafNode = new RBBINode(RBBINode::leafChar, *fStatus);
|
||||
if (U_FAILURE(*fStatus)) {
|
||||
delete leafNode;
|
||||
return;
|
||||
}
|
||||
if (leafNode == nullptr) {
|
||||
*fStatus = U_MEMORY_ALLOCATION_ERROR;
|
||||
return;
|
||||
|
@ -388,9 +392,13 @@ void RBBISetBuilder::addValToSet(RBBINode *usetNode, uint32_t val) {
|
|||
// There are already input symbols present for this set.
|
||||
// Set up an OR node, with the previous stuff as the left child
|
||||
// and the new value as the right child.
|
||||
RBBINode *orNode = new RBBINode(RBBINode::opOr);
|
||||
RBBINode *orNode = new RBBINode(RBBINode::opOr, *fStatus);
|
||||
if (orNode == nullptr) {
|
||||
*fStatus = U_MEMORY_ALLOCATION_ERROR;
|
||||
}
|
||||
if (U_FAILURE(*fStatus)) {
|
||||
delete orNode;
|
||||
delete leafNode;
|
||||
return;
|
||||
}
|
||||
orNode->fLeftChild = usetNode->fLeftChild;
|
||||
|
|
|
@ -99,13 +99,22 @@ void RBBITableBuilder::buildForwardTable() {
|
|||
// {bof} fake character.
|
||||
//
|
||||
if (fRB->fSetBuilder->sawBOF()) {
|
||||
RBBINode *bofTop = new RBBINode(RBBINode::opCat);
|
||||
RBBINode *bofLeaf = new RBBINode(RBBINode::leafChar);
|
||||
// Delete and exit if memory allocation failed.
|
||||
if (bofTop == nullptr || bofLeaf == nullptr) {
|
||||
RBBINode *bofTop = new RBBINode(RBBINode::opCat, *fStatus);
|
||||
if (bofTop == nullptr) {
|
||||
*fStatus = U_MEMORY_ALLOCATION_ERROR;
|
||||
}
|
||||
if (U_FAILURE(*fStatus)) {
|
||||
delete bofTop;
|
||||
return;
|
||||
}
|
||||
RBBINode *bofLeaf = new RBBINode(RBBINode::leafChar, *fStatus);
|
||||
// Delete and exit if memory allocation failed.
|
||||
if (bofLeaf == nullptr) {
|
||||
*fStatus = U_MEMORY_ALLOCATION_ERROR;
|
||||
}
|
||||
if (U_FAILURE(*fStatus)) {
|
||||
delete bofLeaf;
|
||||
delete bofTop;
|
||||
return;
|
||||
}
|
||||
bofTop->fLeftChild = bofLeaf;
|
||||
|
@ -120,18 +129,23 @@ void RBBITableBuilder::buildForwardTable() {
|
|||
// Appears as a cat-node, left child being the original tree,
|
||||
// right child being the end marker.
|
||||
//
|
||||
RBBINode *cn = new RBBINode(RBBINode::opCat);
|
||||
RBBINode *cn = new RBBINode(RBBINode::opCat, *fStatus);
|
||||
// Exit if memory allocation failed.
|
||||
if (cn == nullptr) {
|
||||
*fStatus = U_MEMORY_ALLOCATION_ERROR;
|
||||
}
|
||||
if (U_FAILURE(*fStatus)) {
|
||||
delete cn;
|
||||
return;
|
||||
}
|
||||
cn->fLeftChild = fTree;
|
||||
fTree->fParent = cn;
|
||||
RBBINode *endMarkerNode = cn->fRightChild = new RBBINode(RBBINode::endMark);
|
||||
RBBINode *endMarkerNode = cn->fRightChild = new RBBINode(RBBINode::endMark, *fStatus);
|
||||
// Delete and exit if memory allocation failed.
|
||||
if (cn->fRightChild == nullptr) {
|
||||
*fStatus = U_MEMORY_ALLOCATION_ERROR;
|
||||
}
|
||||
if (U_FAILURE(*fStatus)) {
|
||||
delete cn;
|
||||
return;
|
||||
}
|
||||
|
@ -142,7 +156,7 @@ void RBBITableBuilder::buildForwardTable() {
|
|||
// Replace all references to UnicodeSets with the tree for the equivalent
|
||||
// expression.
|
||||
//
|
||||
fTree->flattenSets();
|
||||
fTree->flattenSets(*fStatus, 0);
|
||||
#ifdef RBBI_DEBUG
|
||||
if (fRB->fDebugEnv && uprv_strstr(fRB->fDebugEnv, "stree")) {
|
||||
RBBIDebugPuts("\nParse tree after flattening Unicode Set references.");
|
||||
|
|
|
@ -388,7 +388,7 @@ const Locale &ResourceBundle::getLocale() const {
|
|||
return ncThis->fLocale != nullptr ? *ncThis->fLocale : Locale::getDefault();
|
||||
}
|
||||
|
||||
const Locale ResourceBundle::getLocale(ULocDataLocaleType type, UErrorCode &status) const
|
||||
Locale ResourceBundle::getLocale(ULocDataLocaleType type, UErrorCode &status) const
|
||||
{
|
||||
return ures_getLocaleByType(fResource, type, &status);
|
||||
}
|
||||
|
|
|
@ -3146,11 +3146,8 @@ ucnv_MBCSGetNextUChar(UConverterToUnicodeArgs *pArgs,
|
|||
if(c<0) {
|
||||
if(U_SUCCESS(*pErrorCode) && source==sourceLimit && lastSource<source) {
|
||||
/* incomplete character byte sequence */
|
||||
uint8_t *bytes=cnv->toUBytes;
|
||||
cnv->toULength = static_cast<int8_t>(source - lastSource);
|
||||
do {
|
||||
*bytes++=*lastSource++;
|
||||
} while(lastSource<source);
|
||||
uprv_memcpy(cnv->toUBytes, lastSource, cnv->toULength);
|
||||
*pErrorCode=U_TRUNCATED_CHAR_FOUND;
|
||||
} else if(U_FAILURE(*pErrorCode)) {
|
||||
/* callback(illegal) */
|
||||
|
|
|
@ -372,12 +372,8 @@ struct CReg : public icu::UMemory {
|
|||
CReg(const char16_t* _iso, const char* _id)
|
||||
: next(nullptr)
|
||||
{
|
||||
int32_t len = static_cast<int32_t>(uprv_strlen(_id));
|
||||
if (len > static_cast<int32_t>(sizeof(id) - 1)) {
|
||||
len = (sizeof(id)-1);
|
||||
}
|
||||
uprv_strncpy(id, _id, len);
|
||||
id[len] = 0;
|
||||
uprv_strncpy(id, _id, sizeof(id)-1);
|
||||
id[sizeof(id)-1] = 0;
|
||||
u_memcpy(iso, _iso, ISO_CURRENCY_CODE_LENGTH);
|
||||
iso[ISO_CURRENCY_CODE_LENGTH] = 0;
|
||||
}
|
||||
|
@ -682,6 +678,9 @@ ucurr_getName(const char16_t* currency,
|
|||
// this function.
|
||||
UErrorCode ec2 = U_ZERO_ERROR;
|
||||
|
||||
if (locale == nullptr) {
|
||||
locale = uloc_getDefault();
|
||||
}
|
||||
CharString loc = ulocimp_getName(locale, ec2);
|
||||
if (U_FAILURE(ec2)) {
|
||||
*ec = U_ILLEGAL_ARGUMENT_ERROR;
|
||||
|
@ -780,6 +779,9 @@ ucurr_getPluralName(const char16_t* currency,
|
|||
// this function.
|
||||
UErrorCode ec2 = U_ZERO_ERROR;
|
||||
|
||||
if (locale == nullptr) {
|
||||
locale = uloc_getDefault();
|
||||
}
|
||||
CharString loc = ulocimp_getName(locale, ec2);
|
||||
if (U_FAILURE(ec2)) {
|
||||
*ec = U_ILLEGAL_ARGUMENT_ERROR;
|
||||
|
@ -973,6 +975,9 @@ collectCurrencyNames(const char* locale,
|
|||
// Look up the Currencies resource for the given locale.
|
||||
UErrorCode ec2 = U_ZERO_ERROR;
|
||||
|
||||
if (locale == nullptr) {
|
||||
locale = uloc_getDefault();
|
||||
}
|
||||
CharString loc = ulocimp_getName(locale, ec2);
|
||||
if (U_FAILURE(ec2)) {
|
||||
ec = U_ILLEGAL_ARGUMENT_ERROR;
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1043,7 +1043,7 @@ _initializeULanguageTag(ULanguageTag* langtag) {
|
|||
}
|
||||
|
||||
void
|
||||
_appendLanguageToLanguageTag(const char* localeID, icu::ByteSink& sink, bool strict, UErrorCode& status) {
|
||||
_appendLanguageToLanguageTag(std::string_view localeID, icu::ByteSink& sink, bool strict, UErrorCode& status) {
|
||||
UErrorCode tmpStatus = U_ZERO_ERROR;
|
||||
|
||||
if (U_FAILURE(status)) {
|
||||
|
@ -1088,7 +1088,7 @@ _appendLanguageToLanguageTag(const char* localeID, icu::ByteSink& sink, bool str
|
|||
}
|
||||
|
||||
void
|
||||
_appendScriptToLanguageTag(const char* localeID, icu::ByteSink& sink, bool strict, UErrorCode& status) {
|
||||
_appendScriptToLanguageTag(std::string_view localeID, icu::ByteSink& sink, bool strict, UErrorCode& status) {
|
||||
UErrorCode tmpStatus = U_ZERO_ERROR;
|
||||
|
||||
if (U_FAILURE(status)) {
|
||||
|
@ -1118,7 +1118,7 @@ _appendScriptToLanguageTag(const char* localeID, icu::ByteSink& sink, bool stric
|
|||
}
|
||||
|
||||
void
|
||||
_appendRegionToLanguageTag(const char* localeID, icu::ByteSink& sink, bool strict, UErrorCode& status) {
|
||||
_appendRegionToLanguageTag(std::string_view localeID, icu::ByteSink& sink, bool strict, UErrorCode& status) {
|
||||
UErrorCode tmpStatus = U_ZERO_ERROR;
|
||||
|
||||
if (U_FAILURE(status)) {
|
||||
|
@ -1169,7 +1169,7 @@ void _sortVariants(VariantListEntry* first) {
|
|||
}
|
||||
|
||||
void
|
||||
_appendVariantsToLanguageTag(const char* localeID, icu::ByteSink& sink, bool strict, bool& hadPosix, UErrorCode& status) {
|
||||
_appendVariantsToLanguageTag(std::string_view localeID, icu::ByteSink& sink, bool strict, bool& hadPosix, UErrorCode& status) {
|
||||
if (U_FAILURE(status)) { return; }
|
||||
|
||||
UErrorCode tmpStatus = U_ZERO_ERROR;
|
||||
|
@ -1872,7 +1872,7 @@ _appendKeywords(ULanguageTag* langtag, icu::ByteSink& sink, UErrorCode& status)
|
|||
}
|
||||
|
||||
void
|
||||
_appendPrivateuseToLanguageTag(const char* localeID, icu::ByteSink& sink, bool strict, bool /*hadPosix*/, UErrorCode& status) {
|
||||
_appendPrivateuseToLanguageTag(std::string_view localeID, icu::ByteSink& sink, bool strict, bool /*hadPosix*/, UErrorCode& status) {
|
||||
if (U_FAILURE(status)) { return; }
|
||||
|
||||
UErrorCode tmpStatus = U_ZERO_ERROR;
|
||||
|
@ -2596,6 +2596,9 @@ ulocimp_toLanguageTag(const char* localeID,
|
|||
bool hadPosix = false;
|
||||
const char* pKeywordStart;
|
||||
|
||||
if (localeID == nullptr) {
|
||||
localeID = uloc_getDefault();
|
||||
}
|
||||
/* Note: uloc_canonicalize returns "en_US_POSIX" for input locale ID "". See #6835 */
|
||||
icu::CharString canonical = ulocimp_canonicalize(localeID, tmpStatus);
|
||||
if (U_FAILURE(tmpStatus)) {
|
||||
|
@ -2604,7 +2607,7 @@ ulocimp_toLanguageTag(const char* localeID,
|
|||
}
|
||||
|
||||
/* For handling special case - private use only tag */
|
||||
pKeywordStart = locale_getKeywordsStart(canonical.data());
|
||||
pKeywordStart = locale_getKeywordsStart(canonical.toStringPiece());
|
||||
if (pKeywordStart == canonical.data()) {
|
||||
int kwdCnt = 0;
|
||||
bool done = false;
|
||||
|
@ -2642,12 +2645,12 @@ ulocimp_toLanguageTag(const char* localeID,
|
|||
}
|
||||
}
|
||||
|
||||
_appendLanguageToLanguageTag(canonical.data(), sink, strict, status);
|
||||
_appendScriptToLanguageTag(canonical.data(), sink, strict, status);
|
||||
_appendRegionToLanguageTag(canonical.data(), sink, strict, status);
|
||||
_appendVariantsToLanguageTag(canonical.data(), sink, strict, hadPosix, status);
|
||||
_appendLanguageToLanguageTag(canonical.toStringPiece(), sink, strict, status);
|
||||
_appendScriptToLanguageTag(canonical.toStringPiece(), sink, strict, status);
|
||||
_appendRegionToLanguageTag(canonical.toStringPiece(), sink, strict, status);
|
||||
_appendVariantsToLanguageTag(canonical.toStringPiece(), sink, strict, hadPosix, status);
|
||||
_appendKeywordsToLanguageTag(canonical.data(), sink, strict, hadPosix, status);
|
||||
_appendPrivateuseToLanguageTag(canonical.data(), sink, strict, hadPosix, status);
|
||||
_appendPrivateuseToLanguageTag(canonical.toStringPiece(), sink, strict, hadPosix, status);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
#include "unicode/locid.h"
|
||||
|
||||
#include "bytesinkutil.h"
|
||||
#include "charstr.h"
|
||||
#include "cmemory.h"
|
||||
|
||||
U_NAMESPACE_USE
|
||||
|
@ -24,9 +23,7 @@ ulocale_openForLocaleID(const char* localeID, int32_t length, UErrorCode* err) {
|
|||
if (length < 0) {
|
||||
return EXTERNAL(icu::Locale::createFromName(localeID).clone());
|
||||
}
|
||||
CharString str(localeID, length, *err); // Make a NUL terminated copy.
|
||||
if (U_FAILURE(*err)) { return nullptr; }
|
||||
return EXTERNAL(icu::Locale::createFromName(str.data()).clone());
|
||||
return EXTERNAL(icu::Locale::createFromName(StringPiece{localeID, length}).clone());
|
||||
}
|
||||
|
||||
ULocale*
|
||||
|
|
|
@ -68,42 +68,42 @@ U_EXPORT std::optional<std::string_view>
|
|||
ulocimp_toLegacyTypeWithFallback(std::string_view keyword, std::string_view value);
|
||||
|
||||
U_EXPORT icu::CharString
|
||||
ulocimp_getKeywords(const char* localeID,
|
||||
ulocimp_getKeywords(std::string_view localeID,
|
||||
char prev,
|
||||
bool valuesToo,
|
||||
UErrorCode& status);
|
||||
|
||||
U_EXPORT void
|
||||
ulocimp_getKeywords(const char* localeID,
|
||||
ulocimp_getKeywords(std::string_view localeID,
|
||||
char prev,
|
||||
icu::ByteSink& sink,
|
||||
bool valuesToo,
|
||||
UErrorCode& status);
|
||||
|
||||
U_EXPORT icu::CharString
|
||||
ulocimp_getName(const char* localeID,
|
||||
ulocimp_getName(std::string_view localeID,
|
||||
UErrorCode& err);
|
||||
|
||||
U_EXPORT void
|
||||
ulocimp_getName(const char* localeID,
|
||||
ulocimp_getName(std::string_view localeID,
|
||||
icu::ByteSink& sink,
|
||||
UErrorCode& err);
|
||||
|
||||
U_EXPORT icu::CharString
|
||||
ulocimp_getBaseName(const char* localeID,
|
||||
ulocimp_getBaseName(std::string_view localeID,
|
||||
UErrorCode& err);
|
||||
|
||||
U_EXPORT void
|
||||
ulocimp_getBaseName(const char* localeID,
|
||||
ulocimp_getBaseName(std::string_view localeID,
|
||||
icu::ByteSink& sink,
|
||||
UErrorCode& err);
|
||||
|
||||
U_EXPORT icu::CharString
|
||||
ulocimp_canonicalize(const char* localeID,
|
||||
ulocimp_canonicalize(std::string_view localeID,
|
||||
UErrorCode& err);
|
||||
|
||||
U_EXPORT void
|
||||
ulocimp_canonicalize(const char* localeID,
|
||||
ulocimp_canonicalize(std::string_view localeID,
|
||||
icu::ByteSink& sink,
|
||||
UErrorCode& err);
|
||||
|
||||
|
@ -119,16 +119,16 @@ ulocimp_getKeywordValue(const char* localeID,
|
|||
UErrorCode& status);
|
||||
|
||||
U_EXPORT icu::CharString
|
||||
ulocimp_getLanguage(const char* localeID, UErrorCode& status);
|
||||
ulocimp_getLanguage(std::string_view localeID, UErrorCode& status);
|
||||
|
||||
U_EXPORT icu::CharString
|
||||
ulocimp_getScript(const char* localeID, UErrorCode& status);
|
||||
ulocimp_getScript(std::string_view localeID, UErrorCode& status);
|
||||
|
||||
U_EXPORT icu::CharString
|
||||
ulocimp_getRegion(const char* localeID, UErrorCode& status);
|
||||
ulocimp_getRegion(std::string_view localeID, UErrorCode& status);
|
||||
|
||||
U_EXPORT icu::CharString
|
||||
ulocimp_getVariant(const char* localeID, UErrorCode& status);
|
||||
ulocimp_getVariant(std::string_view localeID, UErrorCode& status);
|
||||
|
||||
U_EXPORT void
|
||||
ulocimp_setKeywordValue(std::string_view keywordName,
|
||||
|
@ -145,7 +145,7 @@ ulocimp_setKeywordValue(std::string_view keywords,
|
|||
|
||||
U_EXPORT void
|
||||
ulocimp_getSubtags(
|
||||
const char* localeID,
|
||||
std::string_view localeID,
|
||||
icu::CharString* language,
|
||||
icu::CharString* script,
|
||||
icu::CharString* region,
|
||||
|
@ -155,7 +155,7 @@ ulocimp_getSubtags(
|
|||
|
||||
U_EXPORT void
|
||||
ulocimp_getSubtags(
|
||||
const char* localeID,
|
||||
std::string_view localeID,
|
||||
icu::ByteSink* language,
|
||||
icu::ByteSink* script,
|
||||
icu::ByteSink* region,
|
||||
|
@ -165,7 +165,7 @@ ulocimp_getSubtags(
|
|||
|
||||
inline void
|
||||
ulocimp_getSubtags(
|
||||
const char* localeID,
|
||||
std::string_view localeID,
|
||||
std::nullptr_t,
|
||||
std::nullptr_t,
|
||||
std::nullptr_t,
|
||||
|
@ -364,7 +364,7 @@ ulocimp_minimizeSubtags(const char* localeID,
|
|||
UErrorCode& err);
|
||||
|
||||
U_CAPI const char * U_EXPORT2
|
||||
locale_getKeywordsStart(const char *localeID);
|
||||
locale_getKeywordsStart(std::string_view localeID);
|
||||
|
||||
bool
|
||||
ultag_isExtensionSubtags(const char* s, int32_t len);
|
||||
|
|
|
@ -237,8 +237,13 @@ typedef HANDLE MemoryMap;
|
|||
pData->map = (char *)data + length;
|
||||
pData->pHeader=(const DataHeader *)data;
|
||||
pData->mapAddr = data;
|
||||
#if U_PLATFORM == U_PF_IPHONE
|
||||
#if U_PLATFORM == U_PF_IPHONE || U_PLATFORM == U_PF_ANDROID
|
||||
// Apparently supported from Android 23 and higher:
|
||||
// https://github.com/ggml-org/llama.cpp/pull/3631
|
||||
// Checking for the flag itself is safer than checking for __ANDROID_API__.
|
||||
# ifdef POSIX_MADV_RANDOM
|
||||
posix_madvise(data, length, POSIX_MADV_RANDOM);
|
||||
# endif
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -58,6 +58,8 @@ U_NAMESPACE_END
|
|||
|
||||
U_NAMESPACE_BEGIN
|
||||
|
||||
class CharString;
|
||||
|
||||
/**
|
||||
* The BreakIterator class implements methods for finding the location
|
||||
* of boundaries in text. BreakIterator is an abstract base class.
|
||||
|
@ -646,9 +648,9 @@ protected:
|
|||
private:
|
||||
|
||||
/** @internal (private) */
|
||||
char actualLocale[ULOC_FULLNAME_CAPACITY];
|
||||
char validLocale[ULOC_FULLNAME_CAPACITY];
|
||||
char requestLocale[ULOC_FULLNAME_CAPACITY];
|
||||
CharString* actualLocale = nullptr;
|
||||
CharString* validLocale = nullptr;
|
||||
CharString* requestLocale = nullptr;
|
||||
};
|
||||
|
||||
#ifndef U_HIDE_DEPRECATED_API
|
||||
|
|
|
@ -9,10 +9,13 @@
|
|||
|
||||
#include "unicode/utypes.h"
|
||||
|
||||
#if U_SHOW_CPLUSPLUS_API
|
||||
#if U_SHOW_CPLUSPLUS_API || U_SHOW_CPLUSPLUS_HEADER_API
|
||||
|
||||
#include <cstddef>
|
||||
#include <string_view>
|
||||
#include <type_traits>
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \file
|
||||
|
@ -21,8 +24,6 @@
|
|||
* Also conversion functions from char16_t * to UChar * and OldUChar *.
|
||||
*/
|
||||
|
||||
U_NAMESPACE_BEGIN
|
||||
|
||||
/**
|
||||
* \def U_ALIASING_BARRIER
|
||||
* Barrier for pointer anti-aliasing optimizations even across function boundaries.
|
||||
|
@ -36,6 +37,11 @@ U_NAMESPACE_BEGIN
|
|||
# define U_ALIASING_BARRIER(ptr)
|
||||
#endif
|
||||
|
||||
// ICU DLL-exported
|
||||
#if U_SHOW_CPLUSPLUS_API
|
||||
|
||||
U_NAMESPACE_BEGIN
|
||||
|
||||
/**
|
||||
* char16_t * wrapper with implicit conversion from distinct but bit-compatible pointer types.
|
||||
* @stable ICU 59
|
||||
|
@ -251,6 +257,60 @@ const char16_t *ConstChar16Ptr::get() const { return u_.cp; }
|
|||
#endif
|
||||
/// \endcond
|
||||
|
||||
U_NAMESPACE_END
|
||||
|
||||
#endif // U_SHOW_CPLUSPLUS_API
|
||||
|
||||
// Usable in header-only definitions
|
||||
#if U_SHOW_CPLUSPLUS_API || U_SHOW_CPLUSPLUS_HEADER_API
|
||||
|
||||
namespace U_ICU_NAMESPACE_OR_INTERNAL {
|
||||
|
||||
#ifndef U_FORCE_HIDE_INTERNAL_API
|
||||
/** @internal */
|
||||
template<typename T, typename = std::enable_if_t<std::is_same_v<T, UChar>>>
|
||||
inline const char16_t *uprv_char16PtrFromUChar(const T *p) {
|
||||
if constexpr (std::is_same_v<UChar, char16_t>) {
|
||||
return p;
|
||||
} else {
|
||||
#if U_SHOW_CPLUSPLUS_API
|
||||
return ConstChar16Ptr(p).get();
|
||||
#else
|
||||
#ifdef U_ALIASING_BARRIER
|
||||
U_ALIASING_BARRIER(p);
|
||||
#endif
|
||||
return reinterpret_cast<const char16_t *>(p);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#if !U_CHAR16_IS_TYPEDEF && (!defined(_LIBCPP_VERSION) || _LIBCPP_VERSION < 180000)
|
||||
/** @internal */
|
||||
inline const char16_t *uprv_char16PtrFromUint16(const uint16_t *p) {
|
||||
#if U_SHOW_CPLUSPLUS_API
|
||||
return ConstChar16Ptr(p).get();
|
||||
#else
|
||||
#ifdef U_ALIASING_BARRIER
|
||||
U_ALIASING_BARRIER(p);
|
||||
#endif
|
||||
return reinterpret_cast<const char16_t *>(p);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
#if U_SIZEOF_WCHAR_T==2
|
||||
/** @internal */
|
||||
inline const char16_t *uprv_char16PtrFromWchar(const wchar_t *p) {
|
||||
#if U_SHOW_CPLUSPLUS_API
|
||||
return ConstChar16Ptr(p).get();
|
||||
#else
|
||||
#ifdef U_ALIASING_BARRIER
|
||||
U_ALIASING_BARRIER(p);
|
||||
#endif
|
||||
return reinterpret_cast<const char16_t *>(p);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Converts from const char16_t * to const UChar *.
|
||||
* Includes an aliasing barrier if available.
|
||||
|
@ -307,6 +367,15 @@ inline OldUChar *toOldUCharPtr(char16_t *p) {
|
|||
return reinterpret_cast<OldUChar *>(p);
|
||||
}
|
||||
|
||||
} // U_ICU_NAMESPACE_OR_INTERNAL
|
||||
|
||||
#endif // U_SHOW_CPLUSPLUS_API || U_SHOW_CPLUSPLUS_HEADER_API
|
||||
|
||||
// ICU DLL-exported
|
||||
#if U_SHOW_CPLUSPLUS_API
|
||||
|
||||
U_NAMESPACE_BEGIN
|
||||
|
||||
#ifndef U_FORCE_HIDE_INTERNAL_API
|
||||
/**
|
||||
* Is T convertible to a std::u16string_view or some other 16-bit string view?
|
||||
|
@ -379,6 +448,6 @@ inline std::u16string_view toU16StringViewNullable(const T& text) {
|
|||
|
||||
U_NAMESPACE_END
|
||||
|
||||
#endif /* U_SHOW_CPLUSPLUS_API */
|
||||
#endif // U_SHOW_CPLUSPLUS_API
|
||||
|
||||
#endif // __CHAR16PTR_H__
|
||||
|
|
|
@ -449,6 +449,11 @@ public:
|
|||
*/
|
||||
static Locale U_EXPORT2 createFromName(const char *name);
|
||||
|
||||
#ifndef U_HIDE_INTERNAL_API
|
||||
/** @internal */
|
||||
static Locale U_EXPORT2 createFromName(StringPiece name);
|
||||
#endif /* U_HIDE_INTERNAL_API */
|
||||
|
||||
/**
|
||||
* Creates a locale from the given string after canonicalizing
|
||||
* the string according to CLDR by calling uloc_canonicalize().
|
||||
|
@ -1133,7 +1138,9 @@ private:
|
|||
* @param cLocaleID The new locale name.
|
||||
* @param canonicalize whether to call uloc_canonicalize on cLocaleID
|
||||
*/
|
||||
Locale& init(const char* cLocaleID, UBool canonicalize);
|
||||
Locale& init(const char* localeID, UBool canonicalize);
|
||||
/** @internal */
|
||||
Locale& init(StringPiece localeID, UBool canonicalize);
|
||||
|
||||
/*
|
||||
* Internal constructor to allow construction of a locale object with
|
||||
|
|
|
@ -450,7 +450,7 @@ public:
|
|||
* @return a Locale object
|
||||
* @stable ICU 2.8
|
||||
*/
|
||||
const Locale
|
||||
Locale
|
||||
getLocale(ULocDataLocaleType type, UErrorCode &status) const;
|
||||
#ifndef U_HIDE_INTERNAL_API
|
||||
/**
|
||||
|
|
|
@ -675,14 +675,14 @@ typedef enum UProperty {
|
|||
* @stable ICU 63
|
||||
*/
|
||||
UCHAR_VERTICAL_ORIENTATION=0x1018,
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* Enumerated property Identifier_Status.
|
||||
* Used for UTS #39 General Security Profile for Identifiers
|
||||
* (https://www.unicode.org/reports/tr39/#General_Security_Profile).
|
||||
* @draft ICU 75
|
||||
* @stable ICU 75
|
||||
*/
|
||||
UCHAR_IDENTIFIER_STATUS=0x1019,
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* Enumerated property Indic_Conjunct_Break.
|
||||
* Used in the grapheme cluster break algorithm in UAX #29.
|
||||
|
@ -796,7 +796,6 @@ typedef enum UProperty {
|
|||
UCHAR_SCRIPT_EXTENSIONS=0x7000,
|
||||
/** First constant for Unicode properties with unusual value types. @stable ICU 4.6 */
|
||||
UCHAR_OTHER_PROPERTY_START=UCHAR_SCRIPT_EXTENSIONS,
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* Miscellaneous property Identifier_Type.
|
||||
* Used for UTS #39 General Security Profile for Identifiers
|
||||
|
@ -808,10 +807,9 @@ typedef enum UProperty {
|
|||
*
|
||||
* @see u_hasIDType
|
||||
* @see u_getIDTypes
|
||||
* @draft ICU 75
|
||||
* @stable ICU 75
|
||||
*/
|
||||
UCHAR_IDENTIFIER_TYPE=0x7001,
|
||||
#endif // U_HIDE_DRAFT_API
|
||||
#ifndef U_HIDE_DEPRECATED_API
|
||||
/**
|
||||
* One more than the last constant for Unicode properties with unusual value types.
|
||||
|
@ -2791,13 +2789,12 @@ typedef enum UVerticalOrientation {
|
|||
U_VO_UPRIGHT,
|
||||
} UVerticalOrientation;
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* Identifier Status constants.
|
||||
* See https://www.unicode.org/reports/tr39/#Identifier_Status_and_Type.
|
||||
*
|
||||
* @see UCHAR_IDENTIFIER_STATUS
|
||||
* @draft ICU 75
|
||||
* @stable ICU 75
|
||||
*/
|
||||
typedef enum UIdentifierStatus {
|
||||
/*
|
||||
|
@ -2806,9 +2803,9 @@ typedef enum UIdentifierStatus {
|
|||
* U_ID_STATUS_<Unicode Identifier_Status value name>
|
||||
*/
|
||||
|
||||
/** @draft ICU 75 */
|
||||
/** @stable ICU 75 */
|
||||
U_ID_STATUS_RESTRICTED,
|
||||
/** @draft ICU 75 */
|
||||
/** @stable ICU 75 */
|
||||
U_ID_STATUS_ALLOWED,
|
||||
} UIdentifierStatus;
|
||||
|
||||
|
@ -2817,7 +2814,7 @@ typedef enum UIdentifierStatus {
|
|||
* See https://www.unicode.org/reports/tr39/#Identifier_Status_and_Type.
|
||||
*
|
||||
* @see UCHAR_IDENTIFIER_TYPE
|
||||
* @draft ICU 75
|
||||
* @stable ICU 75
|
||||
*/
|
||||
typedef enum UIdentifierType {
|
||||
/*
|
||||
|
@ -2826,32 +2823,31 @@ typedef enum UIdentifierType {
|
|||
* U_ID_TYPE_<Unicode Identifier_Type value name>
|
||||
*/
|
||||
|
||||
/** @draft ICU 75 */
|
||||
/** @stable ICU 75 */
|
||||
U_ID_TYPE_NOT_CHARACTER,
|
||||
/** @draft ICU 75 */
|
||||
/** @stable ICU 75 */
|
||||
U_ID_TYPE_DEPRECATED,
|
||||
/** @draft ICU 75 */
|
||||
/** @stable ICU 75 */
|
||||
U_ID_TYPE_DEFAULT_IGNORABLE,
|
||||
/** @draft ICU 75 */
|
||||
/** @stable ICU 75 */
|
||||
U_ID_TYPE_NOT_NFKC,
|
||||
/** @draft ICU 75 */
|
||||
/** @stable ICU 75 */
|
||||
U_ID_TYPE_NOT_XID,
|
||||
/** @draft ICU 75 */
|
||||
/** @stable ICU 75 */
|
||||
U_ID_TYPE_EXCLUSION,
|
||||
/** @draft ICU 75 */
|
||||
/** @stable ICU 75 */
|
||||
U_ID_TYPE_OBSOLETE,
|
||||
/** @draft ICU 75 */
|
||||
/** @stable ICU 75 */
|
||||
U_ID_TYPE_TECHNICAL,
|
||||
/** @draft ICU 75 */
|
||||
/** @stable ICU 75 */
|
||||
U_ID_TYPE_UNCOMMON_USE,
|
||||
/** @draft ICU 75 */
|
||||
/** @stable ICU 75 */
|
||||
U_ID_TYPE_LIMITED_USE,
|
||||
/** @draft ICU 75 */
|
||||
/** @stable ICU 75 */
|
||||
U_ID_TYPE_INCLUSION,
|
||||
/** @draft ICU 75 */
|
||||
/** @stable ICU 75 */
|
||||
U_ID_TYPE_RECOMMENDED,
|
||||
} UIdentifierType;
|
||||
#endif // U_HIDE_DRAFT_API
|
||||
|
||||
/**
|
||||
* Check a binary Unicode property for a code point.
|
||||
|
@ -4057,7 +4053,6 @@ u_isIDStart(UChar32 c);
|
|||
U_CAPI UBool U_EXPORT2
|
||||
u_isIDPart(UChar32 c);
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* Does the set of Identifier_Type values code point c contain the given type?
|
||||
*
|
||||
|
@ -4069,7 +4064,7 @@ u_isIDPart(UChar32 c);
|
|||
* @param c code point
|
||||
* @param type Identifier_Type to check
|
||||
* @return true if type is in Identifier_Type(c)
|
||||
* @draft ICU 75
|
||||
* @stable ICU 75
|
||||
*/
|
||||
U_CAPI bool U_EXPORT2
|
||||
u_hasIDType(UChar32 c, UIdentifierType type);
|
||||
|
@ -4104,11 +4099,10 @@ u_hasIDType(UChar32 c, UIdentifierType type);
|
|||
* function chaining. (See User Guide for details.)
|
||||
* @return number of values in c's Identifier_Type,
|
||||
* written to types unless U_BUFFER_OVERFLOW_ERROR indicates insufficient capacity
|
||||
* @draft ICU 75
|
||||
* @stable ICU 75
|
||||
*/
|
||||
U_CAPI int32_t U_EXPORT2
|
||||
u_getIDTypes(UChar32 c, UIdentifierType *types, int32_t capacity, UErrorCode *pErrorCode);
|
||||
#endif // U_HIDE_DRAFT_API
|
||||
|
||||
/**
|
||||
* Determines if the specified character should be regarded
|
||||
|
|
|
@ -1173,10 +1173,12 @@ public:
|
|||
inline U_HEADER_NESTED_NAMESPACE::USetStrings strings() const {
|
||||
return U_HEADER_NESTED_NAMESPACE::USetStrings(toUSet());
|
||||
}
|
||||
#endif // U_HIDE_DRAFT_API
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* Returns a C++ iterator for iterating over all of the elements of this set.
|
||||
* Convenient all-in one iteration, but creates a UnicodeString for each
|
||||
* Convenient all-in one iteration, but creates a std::u16string for each
|
||||
* code point or string.
|
||||
* (Similar to how Java UnicodeSet *is an* Iterable<String>.)
|
||||
*
|
||||
|
@ -1185,13 +1187,14 @@ public:
|
|||
* \code
|
||||
* UnicodeSet set(u"[abcçカ🚴{}{abc}{de}]", errorCode);
|
||||
* for (auto el : set) {
|
||||
* UnicodeString us(el);
|
||||
* std::string u8;
|
||||
* printf("set.string length %ld \"%s\"\n", (long)el.length(), el.toUTF8String(u8).c_str());
|
||||
* printf("set.element length %ld \"%s\"\n", (long)us.length(), us.toUTF8String(u8).c_str());
|
||||
* }
|
||||
* \endcode
|
||||
*
|
||||
* @return an all-elements iterator.
|
||||
* @draft ICU 76
|
||||
* @draft ICU 77
|
||||
* @see end
|
||||
* @see codePoints
|
||||
* @see ranges
|
||||
|
@ -1203,7 +1206,7 @@ public:
|
|||
|
||||
/**
|
||||
* @return an exclusive-end sentinel for iterating over all of the elements of this set.
|
||||
* @draft ICU 76
|
||||
* @draft ICU 77
|
||||
* @see begin
|
||||
* @see codePoints
|
||||
* @see ranges
|
||||
|
|
|
@ -32,12 +32,13 @@
|
|||
#include "unicode/utypes.h"
|
||||
#include "unicode/uchar.h"
|
||||
|
||||
#if U_SHOW_CPLUSPLUS_API
|
||||
#if U_SHOW_CPLUSPLUS_API || U_SHOW_CPLUSPLUS_HEADER_API
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include "unicode/char16ptr.h"
|
||||
#include "unicode/localpointer.h"
|
||||
#include "unicode/unistr.h"
|
||||
#endif // U_SHOW_CPLUSPLUS_API
|
||||
#include "unicode/utf16.h"
|
||||
#endif
|
||||
|
||||
#ifndef USET_DEFINED
|
||||
|
||||
|
@ -1392,8 +1393,8 @@ public:
|
|||
private:
|
||||
friend class USetCodePoints;
|
||||
|
||||
USetCodePointIterator(const USet *uset, int32_t rangeIndex, int32_t rangeCount)
|
||||
: uset(uset), rangeIndex(rangeIndex), rangeCount(rangeCount),
|
||||
USetCodePointIterator(const USet *pUset, int32_t nRangeIndex, int32_t nRangeCount)
|
||||
: uset(pUset), rangeIndex(nRangeIndex), rangeCount(nRangeCount),
|
||||
c(U_SENTINEL), end(U_SENTINEL) {
|
||||
// Fetch the first range.
|
||||
operator++();
|
||||
|
@ -1429,7 +1430,7 @@ public:
|
|||
* Constructs a C++ "range" object over the code points of the USet.
|
||||
* @draft ICU 76
|
||||
*/
|
||||
USetCodePoints(const USet *uset) : uset(uset), rangeCount(uset_getRangeCount(uset)) {}
|
||||
USetCodePoints(const USet *pUset) : uset(pUset), rangeCount(uset_getRangeCount(pUset)) {}
|
||||
|
||||
/** @draft ICU 76 */
|
||||
USetCodePoints(const USetCodePoints &other) = default;
|
||||
|
@ -1460,7 +1461,7 @@ struct CodePointRange {
|
|||
/** @draft ICU 76 */
|
||||
struct iterator {
|
||||
/** @draft ICU 76 */
|
||||
iterator(UChar32 c) : c(c) {}
|
||||
iterator(UChar32 aC) : c(aC) {}
|
||||
|
||||
/** @draft ICU 76 */
|
||||
bool operator==(const iterator &other) const { return c == other.c; }
|
||||
|
@ -1573,8 +1574,8 @@ public:
|
|||
private:
|
||||
friend class USetRanges;
|
||||
|
||||
USetRangeIterator(const USet *uset, int32_t rangeIndex, int32_t rangeCount)
|
||||
: uset(uset), rangeIndex(rangeIndex), rangeCount(rangeCount) {}
|
||||
USetRangeIterator(const USet *pUset, int32_t nRangeIndex, int32_t nRangeCount)
|
||||
: uset(pUset), rangeIndex(nRangeIndex), rangeCount(nRangeCount) {}
|
||||
|
||||
const USet *uset;
|
||||
int32_t rangeIndex;
|
||||
|
@ -1610,7 +1611,7 @@ public:
|
|||
* Constructs a C++ "range" object over the code point ranges of the USet.
|
||||
* @draft ICU 76
|
||||
*/
|
||||
USetRanges(const USet *uset) : uset(uset), rangeCount(uset_getRangeCount(uset)) {}
|
||||
USetRanges(const USet *pUset) : uset(pUset), rangeCount(uset_getRangeCount(pUset)) {}
|
||||
|
||||
/** @draft ICU 76 */
|
||||
USetRanges(const USetRanges &other) = default;
|
||||
|
@ -1657,7 +1658,7 @@ public:
|
|||
int32_t length;
|
||||
const UChar *uchars = uset_getString(uset, index, &length);
|
||||
// assert uchars != nullptr;
|
||||
return {ConstChar16Ptr(uchars), static_cast<uint32_t>(length)};
|
||||
return {uprv_char16PtrFromUChar(uchars), static_cast<size_t>(length)};
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
@ -1684,8 +1685,8 @@ public:
|
|||
private:
|
||||
friend class USetStrings;
|
||||
|
||||
USetStringIterator(const USet *uset, int32_t index, int32_t count)
|
||||
: uset(uset), index(index), count(count) {}
|
||||
USetStringIterator(const USet *pUset, int32_t nIndex, int32_t nCount)
|
||||
: uset(pUset), index(nIndex), count(nCount) {}
|
||||
|
||||
const USet *uset;
|
||||
int32_t index;
|
||||
|
@ -1699,9 +1700,11 @@ private:
|
|||
* using U_HEADER_NESTED_NAMESPACE::USetStrings;
|
||||
* LocalUSetPointer uset(uset_openPattern(u"[abcçカ🚴{}{abc}{de}]", -1, &errorCode));
|
||||
* for (auto s : USetStrings(uset.getAlias())) {
|
||||
* UnicodeString us(s);
|
||||
* std::string u8;
|
||||
* printf("uset.string length %ld \"%s\"\n", (long)s.length(), us.toUTF8String(u8).c_str());
|
||||
* int32_t len32 = s.length();
|
||||
* char utf8[200];
|
||||
* u_strToUTF8WithSub(utf8, int32_t{sizeof(utf8) - 1}, nullptr,
|
||||
* s.data(), len32, 0xFFFD, nullptr, errorCode);
|
||||
* printf("uset.string length %ld \"%s\"\n", long{len32}, utf8);
|
||||
* }
|
||||
* \endcode
|
||||
*
|
||||
|
@ -1718,7 +1721,7 @@ public:
|
|||
* Constructs a C++ "range" object over the strings of the USet.
|
||||
* @draft ICU 76
|
||||
*/
|
||||
USetStrings(const USet *uset) : uset(uset), count(uset_getStringCount(uset)) {}
|
||||
USetStrings(const USet *pUset) : uset(pUset), count(uset_getStringCount(pUset)) {}
|
||||
|
||||
/** @draft ICU 76 */
|
||||
USetStrings(const USetStrings &other) = default;
|
||||
|
@ -1737,17 +1740,19 @@ private:
|
|||
const USet *uset;
|
||||
int32_t count;
|
||||
};
|
||||
#endif // U_HIDE_DRAFT_API
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* Iterator returned by USetElements.
|
||||
* @draft ICU 76
|
||||
* @draft ICU 77
|
||||
*/
|
||||
class USetElementIterator {
|
||||
public:
|
||||
/** @draft ICU 76 */
|
||||
/** @draft ICU 77 */
|
||||
USetElementIterator(const USetElementIterator &other) = default;
|
||||
|
||||
/** @draft ICU 76 */
|
||||
/** @draft ICU 77 */
|
||||
bool operator==(const USetElementIterator &other) const {
|
||||
// No need to compare rangeCount & end given private constructor
|
||||
// and assuming we don't compare iterators across the set being modified.
|
||||
|
@ -1756,26 +1761,28 @@ public:
|
|||
return uset == other.uset && c == other.c && index == other.index;
|
||||
}
|
||||
|
||||
/** @draft ICU 76 */
|
||||
/** @draft ICU 77 */
|
||||
bool operator!=(const USetElementIterator &other) const { return !operator==(other); }
|
||||
|
||||
/** @draft ICU 76 */
|
||||
UnicodeString operator*() const {
|
||||
/** @draft ICU 77 */
|
||||
std::u16string operator*() const {
|
||||
if (c >= 0) {
|
||||
return UnicodeString(c);
|
||||
return c <= 0xffff ?
|
||||
std::u16string({static_cast<char16_t>(c)}) :
|
||||
std::u16string({U16_LEAD(c), U16_TRAIL(c)});
|
||||
} else if (index < totalCount) {
|
||||
int32_t length;
|
||||
const UChar *uchars = uset_getString(uset, index - rangeCount, &length);
|
||||
// assert uchars != nullptr;
|
||||
return UnicodeString(uchars, length);
|
||||
return {uprv_char16PtrFromUChar(uchars), static_cast<size_t>(length)};
|
||||
} else {
|
||||
return UnicodeString();
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Pre-increment.
|
||||
* @draft ICU 76
|
||||
* @draft ICU 77
|
||||
*/
|
||||
USetElementIterator &operator++() {
|
||||
if (c < end) {
|
||||
|
@ -1800,7 +1807,7 @@ public:
|
|||
|
||||
/**
|
||||
* Post-increment.
|
||||
* @draft ICU 76
|
||||
* @draft ICU 77
|
||||
*/
|
||||
USetElementIterator operator++(int) {
|
||||
USetElementIterator result(*this);
|
||||
|
@ -1811,8 +1818,8 @@ public:
|
|||
private:
|
||||
friend class USetElements;
|
||||
|
||||
USetElementIterator(const USet *uset, int32_t index, int32_t rangeCount, int32_t totalCount)
|
||||
: uset(uset), index(index), rangeCount(rangeCount), totalCount(totalCount),
|
||||
USetElementIterator(const USet *pUset, int32_t nIndex, int32_t nRangeCount, int32_t nTotalCount)
|
||||
: uset(pUset), index(nIndex), rangeCount(nRangeCount), totalCount(nTotalCount),
|
||||
c(U_SENTINEL), end(U_SENTINEL) {
|
||||
if (index < rangeCount) {
|
||||
// Fetch the first range.
|
||||
|
@ -1840,7 +1847,7 @@ private:
|
|||
|
||||
/**
|
||||
* A C++ "range" for iterating over all of the elements of a USet.
|
||||
* Convenient all-in one iteration, but creates a UnicodeString for each
|
||||
* Convenient all-in one iteration, but creates a std::u16string for each
|
||||
* code point or string.
|
||||
*
|
||||
* Code points are returned first, then empty and multi-character strings.
|
||||
|
@ -1849,15 +1856,18 @@ private:
|
|||
* using U_HEADER_NESTED_NAMESPACE::USetElements;
|
||||
* LocalUSetPointer uset(uset_openPattern(u"[abcçカ🚴{}{abc}{de}]", -1, &errorCode));
|
||||
* for (auto el : USetElements(uset.getAlias())) {
|
||||
* std::string u8;
|
||||
* printf("uset.string length %ld \"%s\"\n", (long)el.length(), el.toUTF8String(u8).c_str());
|
||||
* int32_t len32 = el.length();
|
||||
* char utf8[200];
|
||||
* u_strToUTF8WithSub(utf8, int32_t{sizeof(utf8) - 1}, nullptr,
|
||||
* el.data(), len32, 0xFFFD, nullptr, errorCode);
|
||||
* printf("uset.element length %ld \"%s\"\n", long{len32}, utf8);
|
||||
* }
|
||||
* \endcode
|
||||
*
|
||||
* C++ UnicodeSet has member functions for iteration, including begin() and end().
|
||||
*
|
||||
* @return an all-elements iterator.
|
||||
* @draft ICU 76
|
||||
* @draft ICU 77
|
||||
* @see USetCodePoints
|
||||
* @see USetRanges
|
||||
* @see USetStrings
|
||||
|
@ -1866,21 +1876,21 @@ class USetElements {
|
|||
public:
|
||||
/**
|
||||
* Constructs a C++ "range" object over all of the elements of the USet.
|
||||
* @draft ICU 76
|
||||
* @draft ICU 77
|
||||
*/
|
||||
USetElements(const USet *uset)
|
||||
: uset(uset), rangeCount(uset_getRangeCount(uset)),
|
||||
stringCount(uset_getStringCount(uset)) {}
|
||||
USetElements(const USet *pUset)
|
||||
: uset(pUset), rangeCount(uset_getRangeCount(pUset)),
|
||||
stringCount(uset_getStringCount(pUset)) {}
|
||||
|
||||
/** @draft ICU 76 */
|
||||
/** @draft ICU 77 */
|
||||
USetElements(const USetElements &other) = default;
|
||||
|
||||
/** @draft ICU 76 */
|
||||
/** @draft ICU 77 */
|
||||
USetElementIterator begin() const {
|
||||
return USetElementIterator(uset, 0, rangeCount, rangeCount + stringCount);
|
||||
}
|
||||
|
||||
/** @draft ICU 76 */
|
||||
/** @draft ICU 77 */
|
||||
USetElementIterator end() const {
|
||||
return USetElementIterator(uset, rangeCount + stringCount, rangeCount, rangeCount + stringCount);
|
||||
}
|
||||
|
|
|
@ -124,7 +124,7 @@
|
|||
* @internal
|
||||
*/
|
||||
U_CAPI UChar32 U_EXPORT2
|
||||
utf8_nextCharSafeBody(const uint8_t *s, int32_t *pi, int32_t length, UChar32 c, UBool strict);
|
||||
utf8_nextCharSafeBody(const uint8_t *s, int32_t *pi, int32_t length, UChar32 c, int8_t strict);
|
||||
|
||||
/**
|
||||
* Function for handling "append code point" with error-checking.
|
||||
|
@ -148,7 +148,7 @@ utf8_appendCharSafeBody(uint8_t *s, int32_t i, int32_t length, UChar32 c, UBool
|
|||
* @internal
|
||||
*/
|
||||
U_CAPI UChar32 U_EXPORT2
|
||||
utf8_prevCharSafeBody(const uint8_t *s, int32_t start, int32_t *pi, UChar32 c, UBool strict);
|
||||
utf8_prevCharSafeBody(const uint8_t *s, int32_t start, int32_t *pi, UChar32 c, int8_t strict);
|
||||
|
||||
/**
|
||||
* Function for handling "skip backward one code point" with error-checking.
|
||||
|
|
|
@ -598,12 +598,13 @@ typedef enum UErrorCode {
|
|||
U_MF_DUPLICATE_DECLARATION_ERROR, /**< The same variable is declared in more than one .local or .input declaration. @internal ICU 75 technology preview @deprecated This API is for technology preview only. */
|
||||
U_MF_OPERAND_MISMATCH_ERROR, /**< An operand provided to a function does not have the required form for that function @internal ICU 75 technology preview @deprecated This API is for technology preview only. */
|
||||
U_MF_DUPLICATE_VARIANT_ERROR, /**< A message includes a variant with the same key list as another variant. @internal ICU 76 technology preview @deprecated This API is for technology preview only. */
|
||||
U_MF_BAD_OPTION, /**< An option value provided to a function does not have the required form for that option. @internal ICU 77 technology preview @deprecated This API is for technology preview only. */
|
||||
#ifndef U_HIDE_DEPRECATED_API
|
||||
/**
|
||||
* One more than the highest normal formatting API error code.
|
||||
* @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
|
||||
*/
|
||||
U_FMT_PARSE_ERROR_LIMIT = 0x10120,
|
||||
U_FMT_PARSE_ERROR_LIMIT = 0x10121,
|
||||
#endif // U_HIDE_DEPRECATED_API
|
||||
|
||||
/*
|
||||
|
|
|
@ -53,19 +53,19 @@
|
|||
* This value will change in the subsequent releases of ICU
|
||||
* @stable ICU 2.4
|
||||
*/
|
||||
#define U_ICU_VERSION_MAJOR_NUM 76
|
||||
#define U_ICU_VERSION_MAJOR_NUM 78
|
||||
|
||||
/** The current ICU minor version as an integer.
|
||||
* This value will change in the subsequent releases of ICU
|
||||
* @stable ICU 2.6
|
||||
*/
|
||||
#define U_ICU_VERSION_MINOR_NUM 1
|
||||
#define U_ICU_VERSION_MINOR_NUM 0
|
||||
|
||||
/** The current ICU patchlevel version as an integer.
|
||||
* This value will change in the subsequent releases of ICU
|
||||
* @stable ICU 2.4
|
||||
*/
|
||||
#define U_ICU_VERSION_PATCHLEVEL_NUM 0
|
||||
#define U_ICU_VERSION_PATCHLEVEL_NUM 1
|
||||
|
||||
/** The current ICU build level version as an integer.
|
||||
* This value is for use by ICU clients. It defaults to 0.
|
||||
|
@ -79,7 +79,7 @@
|
|||
* This value will change in the subsequent releases of ICU
|
||||
* @stable ICU 2.6
|
||||
*/
|
||||
#define U_ICU_VERSION_SUFFIX _76
|
||||
#define U_ICU_VERSION_SUFFIX _78
|
||||
|
||||
/**
|
||||
* \def U_DEF2_ICU_ENTRY_POINT_RENAME
|
||||
|
@ -132,7 +132,7 @@
|
|||
* This value will change in the subsequent releases of ICU
|
||||
* @stable ICU 2.4
|
||||
*/
|
||||
#define U_ICU_VERSION "76.1"
|
||||
#define U_ICU_VERSION "78.0.1"
|
||||
|
||||
/**
|
||||
* The current ICU library major version number as a string, for library name suffixes.
|
||||
|
@ -145,13 +145,13 @@
|
|||
*
|
||||
* @stable ICU 2.6
|
||||
*/
|
||||
#define U_ICU_VERSION_SHORT "76"
|
||||
#define U_ICU_VERSION_SHORT "78"
|
||||
|
||||
#ifndef U_HIDE_INTERNAL_API
|
||||
/** Data version in ICU4C.
|
||||
* @internal ICU 4.4 Internal Use Only
|
||||
**/
|
||||
#define U_ICU_DATA_VERSION "76.1"
|
||||
#define U_ICU_DATA_VERSION "78.0.1"
|
||||
#endif /* U_HIDE_INTERNAL_API */
|
||||
|
||||
/*===========================================================================
|
||||
|
|
|
@ -125,7 +125,7 @@ typedef uint8_t UVersionInfo[U_MAX_VERSION_LENGTH];
|
|||
U_NAMESPACE_USE
|
||||
# endif
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
#ifndef U_FORCE_HIDE_DRAFT_API
|
||||
/**
|
||||
* \def U_HEADER_NESTED_NAMESPACE
|
||||
* Nested namespace used inside U_ICU_NAMESPACE for header-only APIs.
|
||||
|
@ -150,22 +150,37 @@ typedef uint8_t UVersionInfo[U_MAX_VERSION_LENGTH];
|
|||
* @draft ICU 76
|
||||
*/
|
||||
|
||||
/**
|
||||
* \def U_ICU_NAMESPACE_OR_INTERNAL
|
||||
* Namespace used for header-only APIs that used to be regular C++ APIs.
|
||||
* Different when used inside ICU to prevent public use of internal instantiations.
|
||||
* Similar to U_HEADER_ONLY_NAMESPACE, but the public definition is the same as U_ICU_NAMESPACE.
|
||||
* "U_ICU_NAMESPACE" or "U_ICU_NAMESPACE::internal".
|
||||
*
|
||||
* @draft ICU 77
|
||||
*/
|
||||
|
||||
// The first test is the same as for defining U_EXPORT for Windows.
|
||||
#if defined(_MSC_VER) || (UPRV_HAS_DECLSPEC_ATTRIBUTE(__dllexport__) && \
|
||||
UPRV_HAS_DECLSPEC_ATTRIBUTE(__dllimport__))
|
||||
# define U_HEADER_NESTED_NAMESPACE header
|
||||
# define U_ICU_NAMESPACE_OR_INTERNAL U_ICU_NAMESPACE
|
||||
#elif defined(U_COMBINED_IMPLEMENTATION) || defined(U_COMMON_IMPLEMENTATION) || \
|
||||
defined(U_I18N_IMPLEMENTATION) || defined(U_IO_IMPLEMENTATION) || \
|
||||
defined(U_LAYOUTEX_IMPLEMENTATION) || defined(U_TOOLUTIL_IMPLEMENTATION)
|
||||
# define U_HEADER_NESTED_NAMESPACE internal
|
||||
# define U_ICU_NAMESPACE_OR_INTERNAL U_ICU_NAMESPACE::internal
|
||||
namespace U_ICU_NAMESPACE_OR_INTERNAL {}
|
||||
using namespace U_ICU_NAMESPACE_OR_INTERNAL;
|
||||
#else
|
||||
# define U_HEADER_NESTED_NAMESPACE header
|
||||
# define U_ICU_NAMESPACE_OR_INTERNAL U_ICU_NAMESPACE
|
||||
#endif
|
||||
|
||||
#define U_HEADER_ONLY_NAMESPACE U_ICU_NAMESPACE::U_HEADER_NESTED_NAMESPACE
|
||||
|
||||
namespace U_HEADER_ONLY_NAMESPACE {}
|
||||
#endif // U_HIDE_DRAFT_API
|
||||
#endif // U_FORCE_HIDE_DRAFT_API
|
||||
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue