mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-18 11:14:22 +00:00
ICU-11537 genrb write .res formatVersion 2 if it would default to 3 without benefit: without sharing pool bundle string values
X-SVN-Rev: 37736
This commit is contained in:
parent
9e0d7d9554
commit
00ae09aa36
1 changed files with 14 additions and 0 deletions
|
@ -465,6 +465,10 @@ main(int argc,
|
|||
p += length + 1;
|
||||
remaining -= length + 1;
|
||||
} while (remaining > 0);
|
||||
if (poolBundle.fStrings->fCount == 0) {
|
||||
delete poolBundle.fStrings;
|
||||
poolBundle.fStrings = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
T_FileStream_close(poolFile);
|
||||
|
@ -477,6 +481,16 @@ main(int argc,
|
|||
}
|
||||
}
|
||||
|
||||
if(!options[FORMAT_VERSION].doesOccur && getFormatVersion() == 3 &&
|
||||
poolBundle.fStrings == NULL &&
|
||||
!options[WRITE_POOL_BUNDLE].doesOccur) {
|
||||
// If we just default to formatVersion 3
|
||||
// but there are no pool bundle strings to share
|
||||
// and we do not write a pool bundle,
|
||||
// then write formatVersion 2 which is just as good.
|
||||
setFormatVersion(2);
|
||||
}
|
||||
|
||||
if(options[INCLUDE_UNIHAN_COLL].doesOccur) {
|
||||
puts("genrb option --includeUnihanColl ignored: \n"
|
||||
"CLDR 26/ICU 54 unihan data is small, except\n"
|
||||
|
|
Loading…
Add table
Reference in a new issue