开发者

problem with encoding & loading in the webview

开发者 https://www.devze.com 2023-03-17 19:46 出处:网络
NSString *URL=[NSString stringWithString:kSearchBarURL] ; NSMutableURLRequest *request =[NSMutableURLRequest requestWithURL:[NSURL URLWithString:URL]];
    NSString *URL=[NSString stringWithString:kSearchBarURL] ;

    NSMutableURLRequest *request =  [NSMutableURLRequest requestWithURL:[NSURL URLWithString:URL]];

    [request setHTTPMethod:@"POST"];

    [request setHTTPBody:[[NSString stringWithFormat:@"searchKeyword=%@",encodedString ] dataUsingEncoding:NSUTF8StringEncoding]];  

    debug(@"request to be made: %@",request);

    [iWebview loadRequest:request];

What ever the string 开发者_StackOverflow中文版is entered i displaying in the webview.....

I am encoding the string which the user will enter in the text field.

Now and when entering the * / % @ # this key work in the text field its encoding ....

and displaying in the webview what i entered with the special characters.

when its come to & its not displaying in the webview.

can any one help me out

@ thanks in advance

0

精彩评论

暂无评论...
验证码 换一张
取 消