diff --git a/double-conversion/double-conversion.cc b/double-conversion/double-conversion.cc
index 854f4b6..388cb39 100644
--- a/double-conversion/double-conversion.cc
+++ b/double-conversion/double-conversion.cc
@@ -553,7 +553,7 @@
 
 // Returns true, when the iterator is equal to end.
 template<class Iterator>
-static bool Advance (Iterator* it, char separator, int base, Iterator& end) {
+static bool Advance (Iterator* it, uc16 separator, int base, Iterator& end) {
   if (separator == StringToDoubleConverter::kNoSeparator) {
     ++(*it);
     return *it == end;
@@ -581,7 +581,7 @@
 template<class Iterator>
 static bool IsHexFloatString(Iterator start,
                              Iterator end,
-                             char separator,
+                             uc16 separator,
                              bool allow_trailing_junk) {
   ASSERT(start != end);
 
@@ -622,7 +622,7 @@
 static double RadixStringToIeee(Iterator* current,
                                 Iterator end,
                                 bool sign,
-                                char separator,
+                                uc16 separator,
                                 bool parse_as_hex_float,
                                 bool allow_trailing_junk,
                                 double junk_string_value,
diff --git a/test/cctest/test-conversions.cc b/test/cctest/test-conversions.cc
index 9ebc823..6445b6d 100644
--- a/test/cctest/test-conversions.cc
+++ b/test/cctest/test-conversions.cc
@@ -1735,6 +1735,33 @@
 }
 
 
+static double StrToD16(const char* str, int flags,
+                       double empty_string_value,
+                       int* processed_characters_count, bool* processed_all,
+                       char char_separator, uc16 separator) {
+  uc16 str16[256];
+  int length = -1;
+  for (int i = 0;; i++) {
+    if (str[i] == char_separator) {
+            str16[i] = separator;
+    } else {
+            str16[i] = str[i];
+    }
+    if (str[i] == '\0') {
+      length = i;
+      break;
+    }
+  }
+  ASSERT(length < 256);
+  StringToDoubleConverter converter(flags, empty_string_value, Double::NaN(),
+                                    NULL, NULL, separator);
+  double result =
+      converter.StringToDouble(str16, length, processed_characters_count);
+  *processed_all = (length == *processed_characters_count);
+  return result;
+}
+
+
 static double StrToD(const char* str, int flags, double empty_string_value,
                      int* processed_characters_count, bool* processed_all,
                      uc16 separator = StringToDoubleConverter::kNoSeparator) {
@@ -3207,7 +3234,7 @@
   int flags;
   int processed;
   bool all_used;
-  char separator;
+  uc16 separator;
 
   separator = '\'';
   flags = StringToDoubleConverter::NO_FLAGS;
@@ -3518,6 +3545,71 @@
   CHECK_EQ(Double::NaN(),
            StrToD("0x0 3.p -0", flags, 0.0, &processed, &all_used));
   CHECK_EQ(0, processed);
+
+  separator = 0x202F;
+  char char_separator = '@';
+  flags = StringToDoubleConverter::ALLOW_HEX |
+      StringToDoubleConverter::ALLOW_HEX_FLOATS |
+      StringToDoubleConverter::ALLOW_LEADING_SPACES |
+      StringToDoubleConverter::ALLOW_TRAILING_SPACES;
+
+  CHECK_EQ(18.0,
+           StrToD16("0x1@2", flags, 0.0, &processed, &all_used,
+                    char_separator, separator));
+  CHECK(all_used);
+
+  CHECK_EQ(0.0, StrToD16("0x0@0", flags, 1.0, &processed, &all_used,
+                         char_separator, separator));
+  CHECK(all_used);
+
+  CHECK_EQ(static_cast<double>(0x123456789),
+           StrToD16("0x1@2@3@4@5@6@7@8@9", flags, Double::NaN(),
+                    &processed, &all_used, char_separator, separator));
+  CHECK(all_used);
+
+  CHECK_EQ(18.0, StrToD16(" 0x1@2 ", flags, 0.0,
+                          &processed, &all_used, char_separator, separator));
+  CHECK(all_used);
+
+  CHECK_EQ(static_cast<double>(0xabcdef),
+           StrToD16("0xa@b@c@d@e@f", flags, 0.0,
+                    &processed, &all_used, char_separator, separator));
+  CHECK(all_used);
+
+  CHECK_EQ(Double::NaN(),
+           StrToD16("0x@1@2", flags, 0.0,
+                    &processed, &all_used, char_separator, separator));
+  CHECK_EQ(0, processed);
+
+  CHECK_EQ(Double::NaN(),
+           StrToD16("0@x0", flags, 1.0,
+                    &processed, &all_used, char_separator, separator));
+  CHECK_EQ(0, processed);
+
+  CHECK_EQ(Double::NaN(),
+           StrToD16("0x1@2@@3@4@5@6@7@8@9", flags, Double::NaN(),
+                  &processed, &all_used, char_separator, separator));
+  CHECK_EQ(0, processed);
+
+  CHECK_EQ(3.0,
+           StrToD16("0x0@3p0", flags, 0.0, &processed, &all_used,
+                    char_separator, separator));
+  CHECK(all_used);
+
+  CHECK_EQ(0.0,
+           StrToD16("0x.0@0p0", flags, 0.0, &processed, &all_used,
+                    char_separator, separator));
+  CHECK(all_used);
+
+  CHECK_EQ(3.0,
+           StrToD16("0x3.0@0p0", flags, 0.0, &processed, &all_used,
+                    char_separator, separator));
+  CHECK(all_used);
+
+  CHECK_EQ(3.0,
+           StrToD16("0x0@23.p0", flags, 0.0, &processed, &all_used,
+                    char_separator, separator));
+  CHECK(all_used);
 }
 
 TEST(StringToDoubleSpecialValues) {
