Bug 383542. Stop word breaking at NBSP. r+moa=smontagu
authorroc+@cs.cmu.edu
Thu, 14 Jun 2007 19:33:54 -0700
changeset 2427 dbf298da2f861cfac5d790c9dee8e8a3d9389c7b
parent 2426 fdc40bfbf854e6714b7def6e53b5c953b4396ba8
child 2428 b82e108370c575b761f78e7ce1f5d0fef964fd64
push idunknown
push userunknown
push dateunknown
bugs383542
milestone1.9a6pre
Bug 383542. Stop word breaking at NBSP. r+moa=smontagu
intl/lwbrk/src/nsSampleWordBreaker.cpp
--- a/intl/lwbrk/src/nsSampleWordBreaker.cpp
+++ b/intl/lwbrk/src/nsSampleWordBreaker.cpp
@@ -86,17 +86,19 @@ PRUint8 nsSampleWordBreaker::GetClass(PR
 			  return kWbClassSpace;
 		  } else if(ASCII_IS_ALPHA(c) || ASCII_IS_DIGIT(c)) {
 			  return kWbClassAlphaLetter;
 		  } else {
 			  return kWbClassPunct;
 		  }
 	  } else if(IS_THAI(c))	{
 		  return kWbClassThaiLetter;
-	  } else {
+	  } else if (c == 0x00A0/*NBSP*/) {
+      return kWbClassSpace;
+    } else {
 		  return kWbClassAlphaLetter;
 	  }
   }  else {
 	  if(IS_HAN(c)) {
 		  return kWbClassHanLetter;
 	  } else if(IS_KATAKANA(c))   {
 		  return kWbClassKatakanaLetter;
 	  } else if(IS_HIRAGANA(c))   {