utf-8エンコーディングでJSON文字列を送信するPHPサーバーがあります。 データを取得するiPhoneアプリの責任を負う。phpサーバーからiphoneにutf8でjsonを送信する方法の詳細
私は私の側にすべてが正しいことを確認したい:
//after I downlad the data stream :
NSString* content = [[NSString alloc] initWithData:self.m_dataToParse encoding:NSUTF8StringEncoding];
//here the data is shown correctly in the console
NSLog(@"%@",content);
SBJsonParser *_parser = [[SBJsonParser alloc]init];
NSDictionary *jsonContentDictionary = [_parser objectWithData:self.m_dataToParse];
//here, when i printer values of array IN array, i see \u454 u\545 \4545 format. any ideas why ?
for(id key in jsonContentDictionary)
{
NSLog(@"key:%@, value:%@,key, [ jsonContentDictionary objectForKey:key]);
}
イムJSONライブラリの最新バージョンを使用して:問題があり https://github.com/stig/json-framework/
は、iphone側ですか? (jsonパーサー?)またはPHPサーバーですか?
もう一度明確にする:文字列が、JSONをやっ2.after をo.kに見える 1.onコンソールは、JSONの前に、配列値の配列は、事前に\u545 \u453 \u545
感謝の形式です。
お返事ありがとうございます。 この情報をPHPプログラマーに送ってください。 – mark100