[haiku-commits] Re: r41084 - haiku/trunk/src/kits/support

  • From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 23 Mar 2011 10:52:37 +0100 (MET)

clemens.zeidler@xxxxxxxxxxxxxx wrote:
> -     int32 startCount = 0;
> -     while (isspace(string[startCount]))
> +     // string is \0 terminated thus we don't need to check if we reached the
> end
> +     uint32 startCount = 0;
> +     while (iswspace(string[startCount]))

You aren't using iswspace() correctly, it can't do anything with "char"s, it 
needs wide characters to work with.
IIRC libbe.so already links against liblocale.so, right? If so, you could just 
take advantage of the BUnicodeChar class, otherwise, you need to translate the 
string first.

Bye,
   Axel.


Other related posts: