Browse Source

Treat MONGOLIAN_VOWEL_SEPARATOR as whitespace

Fixes #214
Sebastien Ros 9 years ago
parent
commit
5f1cdf4d96
1 changed files with 6 additions and 1 deletions
  1. 6 1
      Jint/Native/String/StringPrototype.cs

+ 6 - 1
Jint/Native/String/StringPrototype.cs

@@ -74,10 +74,15 @@ namespace Jint.Native.String
         // http://msdn.microsoft.com/en-us/library/system.char.iswhitespace(v=vs.110).aspx
         // http://en.wikipedia.org/wiki/Byte_order_mark
         const char BOM_CHAR = '\uFEFF';
+        const char MONGOLIAN_VOWEL_SEPARATOR = '\u180E';
 
         private static bool IsWhiteSpaceEx(char c)
         {
-            return char.IsWhiteSpace(c) || c == BOM_CHAR;
+            return 
+                char.IsWhiteSpace(c) || 
+                c == BOM_CHAR ||
+                // In .NET 4.6 this was removed from WS based on Unicode 6.3 changes
+                c == MONGOLIAN_VOWEL_SEPARATOR;
         }
 
         private static string TrimEndEx(string s)