[Top][All Lists]

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

Re: NSString-stringWithCString: can't handle umlaute

From: Richard Frith-Macdonald
Subject: Re: NSString-stringWithCString: can't handle umlaute
Date: Tue, 27 Apr 2004 12:52:57 +0100

On 26 Apr 2004, at 20:45, Martin Kuball wrote:


the following code

        const char* cstr = "zurück";
        NSString *test = [NSString stringWithCString: cstr];

results in test = nil with gnustep-base 1.9.9. Note that there is no
other hint that something went wrong. The character 'ü' has the
numeric value 252.

What character set is your system set up to use? Most likely problem is that it is one where 252 is not a legal character. The proper behavior of an initialiser
which fails is to return nil.

Using gdb when trying to step into the method call I end up in a
function GSScanDouble. I will try to investigate further but any help
is welcome.

I can't see how you could get to GSScanDouble within stringWithCString:
Did you try setting a breakpoint in the method instead?

reply via email to

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