0
エンコーディングに問題があるようです。目的C文字列エンコーディング
私は次のコードを持っている:
// Sets the server url and whether or not the server is logged in
- (Server *) init:(NSString *) url {
// Setup the singleton!
_instance = self;
// Store our own copy of the string
self.serverUrl = [[NSString alloc] initWithString:url];
self.is_logged = NO;
NSLog(@"Given: %s Current: %s Should BE: %s", url, self.serverUrl, @"http://clanware.com:8000/api");
return self;
}
`
次のようにオブジェクトがインスタンス化されます。
self.server = [[Server alloc] init:@"http://clanware.com:8000/api"];
NSLog(@"URL in Server: %s", self.server.serverUrl);
私はgdbの中に次の出力を取得する(私はこれでを実行しているがxcode)
[Session started at 2010-12-02 11:55:35 -0400.]
2010-12-02 11:55:40.388 ProjectPrototype[1765:207] Given: `üô» Current: `üô» Should BE: `üô»
2010-12-02 11:55:40.390 ProjectPrototype[1765:207] URL in Server: `üô»
何か助けていただければ幸いです。たくさん
感謝=)
を! –