summaryrefslogtreecommitdiffstats
path: root/thirdparty/icu4c/common/locresdata.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparty/icu4c/common/locresdata.cpp')
-rw-r--r--thirdparty/icu4c/common/locresdata.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/thirdparty/icu4c/common/locresdata.cpp b/thirdparty/icu4c/common/locresdata.cpp
index 7a0969dff5..c9d1cdddde 100644
--- a/thirdparty/icu4c/common/locresdata.cpp
+++ b/thirdparty/icu4c/common/locresdata.cpp
@@ -24,6 +24,8 @@
#include "unicode/putil.h"
#include "unicode/uloc.h"
#include "unicode/ures.h"
+#include "bytesinkutil.h"
+#include "charstr.h"
#include "cstring.h"
#include "ulocimp.h"
#include "uresimp.h"
@@ -156,16 +158,18 @@ _uloc_getOrientationHelper(const char* localeId,
ULayoutType result = ULOC_LAYOUT_UNKNOWN;
if (!U_FAILURE(*status)) {
- int32_t length = 0;
- char localeBuffer[ULOC_FULLNAME_CAPACITY];
-
- uloc_canonicalize(localeId, localeBuffer, sizeof(localeBuffer), status);
+ icu::CharString localeBuffer;
+ {
+ icu::CharStringByteSink sink(&localeBuffer);
+ ulocimp_canonicalize(localeId, sink, status);
+ }
if (!U_FAILURE(*status)) {
+ int32_t length = 0;
const char16_t* const value =
uloc_getTableStringWithFallback(
nullptr,
- localeBuffer,
+ localeBuffer.data(),
"layout",
nullptr,
key,