Index: src/i18n.cc |
diff --git a/src/i18n.cc b/src/i18n.cc |
index d2245ef34a9a319a53b4cf4b4ea05ec095fef2d5..7c22871ff5e440f771659d44a0db013b34ec2105 100644 |
--- a/src/i18n.cc |
+++ b/src/i18n.cc |
@@ -30,8 +30,13 @@ |
#include "unicode/ucol.h" |
#include "unicode/ucurr.h" |
#include "unicode/unum.h" |
+#include "unicode/uvernum.h" |
#include "unicode/uversion.h" |
+#if U_ICU_VERSION_MAJOR_NUM >= 59 |
+#include "unicode/char16ptr.h" |
+#endif |
+ |
namespace v8 { |
namespace internal { |
@@ -270,8 +275,13 @@ icu::DecimalFormat* CreateICUNumberFormat( |
} |
UErrorCode status_digits = U_ZERO_ERROR; |
+#if U_ICU_VERSION_MAJOR_NUM >= 59 |
uint32_t fraction_digits = ucurr_getDefaultFractionDigits( |
- currency.getTerminatedBuffer(), &status_digits); |
+ icu::toUCharPtr(currency.getTerminatedBuffer()), &status_digits); |
+#else |
+ uint32_t fraction_digits = ucurr_getDefaultFractionDigits( |
+ currency.getTerminatedBuffer(), &status_digits); |
+#endif |
if (U_SUCCESS(status_digits)) { |
number_format->setMinimumFractionDigits(fraction_digits); |
number_format->setMaximumFractionDigits(fraction_digits); |