Jeff Davis <pgsql@j-davis.com> writes:
> On Mon, 2022-11-28 at 19:36 -0800, Jeff Davis wrote:
>> On Mon, 2022-11-28 at 21:57 -0500, Robert Haas wrote:
>> > That is ... astonishingly bad.
>>
>> https://unicode-org.atlassian.net/browse/CLDR-16175
>
> Oops, reported in CLDR instead of ICU. Moved to:
>
> https://unicode-org.atlassian.net/browse/ICU-22215
Out of morbid curiosity I went source diving, and the culprit is this
bit (which will also break if a version component ever goes above 999):
/* write the decimal field value */
field=versionArray[part];
if(field>=100) {
*versionString++=(char)('0'+field/100);
field%=100;
}
if(field>=10) {
*versionString++=(char)('0'+field/10);
field%=10;
}
*versionString++=(char)('0'+field);
(https://sources.debian.org/src/icu/72.1-3/source/common/putil.cpp#L2308)
because apparently snprintf() is too hard?
- ilmari