//判斷是否有中文
-(BOOL)hasChinese:(NSString *)str {
    for(int i=0; i< [str length];i++){
        int a = [str characterAtIndex:i];
        if( a > 0x4e00 && a < 0x9fff)
        {
            return YES;
        }
    }
    return NO;
}

//有中文的連結處理
str1 = [str stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];