名前のリストと各名前のコメントを含むDBがあります。その名前を問題なくテーブルビューにリストしていますが、名前をクリックしてコメントを取得すると、結果が得られず、アラビア語のみが表示されます名前ですが、英語の名前を選択すると結果が得られます。問題は、アラビア文字が含まれているとリンクを送信できないxcodeにあると思います。
リンクを safari に入れると、英語名とアラビア語名の結果が得られるので、私の php コードは問題ないと確信しています。
私がxcodeで使用しているコードは
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
NSString *tempTitle = [NSString stringWithFormat:@"%@", [array objectAtIndex:indexPath.row]];
NSString *strURL = [NSString stringWithFormat:@"http://localhost/getComment.php?name=%@",tempTitle];
NSData *dataURL = [NSData dataWithContentsOfURL:[NSURL URLWithString:strURL]];
NSString *strResult = [[NSString alloc] initWithData:dataURL encoding:NSUTF8StringEncoding];
NSLog(@"url : %@", strURL);
NSLog(@"result : %@", strResult);
NSLog(@"title : %@", tempTitle);
}
それを解決する方法はありますか?