ICUTimeData: Use kDefault instead of kFull for the datetime format.

We already used it for the individual date and time formats, so it
only makes sense to use it for the combined datetime format.

This fixes failures to initialize datetime data for non-POSIX locales
after the ICU upgrade, as the "full" format is now longer and contains
characters such as U+202F (NARROW NO-BREAK SPACE) which result in the
UTF-8 encoding being too large to fit in the fixed-size buffer.
This commit is contained in:
Augustin Cavalier
2024-07-11 10:48:27 -04:00
parent ee658d503b
commit 4dcd60085b
@@ -135,7 +135,7 @@ ICUTimeData::SetTo(const Locale& locale, const char* posixLocaleName)
if (result == B_OK) {
try {
DateFormat* format = DateFormat::createDateTimeInstance(
DateFormat::kFull, DateFormat::kFull, fLocale);
DateFormat::kDefault, DateFormat::kDefault, fLocale);
result = _SetLCTimePattern(format, fDateTimeFormat,
sizeof(fDateTimeFormat));
delete format;