Index: src/runtime/runtime-i18n.cc |
diff --git a/src/runtime/runtime-i18n.cc b/src/runtime/runtime-i18n.cc |
index e1f0c8e959f523c81f134cd2fe17742ec1b01a39..e57f8d3626e2b7baeaf6d16bf395b7d952486b01 100644 |
--- a/src/runtime/runtime-i18n.cc |
+++ b/src/runtime/runtime-i18n.cc |
@@ -586,8 +586,9 @@ RUNTIME_FUNCTION(Runtime_StringNormalize) { |
// TODO(mnita): check Normalizer2 (not available in ICU 46) |
UErrorCode status = U_ZERO_ERROR; |
+ icu::UnicodeString input(false, u_value, string_value.length()); |
icu::UnicodeString result; |
- icu::Normalizer::normalize(u_value, normalizationForms[form_id], 0, result, |
+ icu::Normalizer::normalize(input, normalizationForms[form_id], 0, result, |
status); |
if (U_FAILURE(status)) { |
return isolate->heap()->undefined_value(); |