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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user