discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSString lowercaseString


From: Richard Frith-Macdonald
Subject: Re: NSString lowercaseString
Date: Thu, 2 Aug 2012 10:48:06 +0100

On 1 Aug 2012, at 19:04, Sebastian Reitenbach wrote:

> Hi,
> 
> On Wednesday, August 1, 2012 18:00 CEST, "Sebastian Reitenbach" 
> <sebastia@l00-bugdead-prods.de> wrote: 
> 
> On the Apple documentation I found -[NSString lowercaseStringWithLocale:] bug 
> GNUstep doesn't seem to have that.
> When it would be available, would that maybe help me?

I've kept out of this because I don't have an easy answer ... I'm not even sure 
what the problem is  (or more likely, problems are).

However, it doesn't appear that anyone else has spotted anything simple either, 
and while we don't understand the problem, it seems premature to be looking for 
a new method to provide the solution.

So, can I please suggest looking at this slowly and systematically.

It seems possible to me that there are are a variety of areas where a problem 
may be, probably four main ones:

1. what is the compiler putting into the binary?
2. how is base interpreting what it finds?
3. how is the case conversion being done?
4. is there a problem logging it?

The way to find all this out is by stepping through the executable in gdb and 
examining what you find there.

If you debug the test program setting a break point immediately before the 
literal string is used, you can step into the methods.

eg. for         NSString *l = [@"TöÖst" lowercaseString];
you can step into the lowercaseString method and look at the receiver and see 
what class it is, and look  at the underlying character data in the literal 
string and see whether the compiler has actually generated UTF-8
you can then step through and see how characters are being converted to  
lowercase etc.
Is the lowercaseString implementation from the base NSString class the one 
being used?
Is the uni_tolower() function working?
and so on.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]