[haiku-commits] Re: r39341 - haiku/trunk/src/apps/readonlybootprompt

  • From: Andreas Färber <andreas.faerber@xxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 7 Nov 2010 15:17:28 +0100

Am 07.11.2010 um 11:08 schrieb pulkomandy@xxxxxxxxxxxxxxxxx:

Author: pulkomandy
Date: 2010-11-07 11:08:46 +0100 (Sun, 07 Nov 2010)
New Revision: 39341
Changeset: http://dev.haiku-os.org/changeset/39341

Modified:
  haiku/trunk/src/apps/readonlybootprompt/BootPromptWindow.cpp
Log:
* Use BUnicodeChar to decide if a character is space. This is slightly better than considering only ascii space.


Modified: haiku/trunk/src/apps/readonlybootprompt/BootPromptWindow.cpp
===================================================================
--- haiku/trunk/src/apps/readonlybootprompt/BootPromptWindow.cpp 2010-11-07 01:44:27 UTC (rev 39340) +++ haiku/trunk/src/apps/readonlybootprompt/BootPromptWindow.cpp 2010-11-07 10:08:46 UTC (rev 39341)
@@ -150,7 +150,8 @@
                                // text (right after the last space we saw).

                        while (*currentChar != '\0') {
-                               if (*currentChar == ' ') {
+                               if 
(BUnicodeChar::IsWhitespace(BUnicodeChar::FromUTF8(
+                                               currentChar))) {
                                        // TODO : we should also handle other 
kinds of whitespace.
                                        // Chinese seems to use a different 
one. ICU has proper
                                        // support for it.

Does that resolve the TODO? It sounds if any remaining whitespace character recognition issue should be fixed in BUnicodeChar::IsWhitespace() instead now? Or is it an MBCS issue with currentChar?

BR,
Andreas

Other related posts: