美文网首页
国家: http://int.dpool.sina.com.c

国家: http://int.dpool.sina.com.c

作者: FlyTheKite | 来源:发表于2016-11-01 09:05 被阅读31次

    http://int.dpool.sina.com.cn/iplookup/iplookup.php

    

    NSLocalizedDescription=Request failed: unacceptable content-type: text/html}

    

    使用 [NSString stringWithFormat:NSData] (这里的NSData指的是需要转换成NSString的NSData变量)即可。

    如果po出的NSData是不可阅读的乱码,那一般都是有编码格式的,最常用的是NSUTF8StringEncoding,另外还有NSASCIIStringEncoding等,你可以在Apple文档里找到编码格式的那个枚举类型,挨个尝试。当然,如果事先知道得到的NSData的编码类型就最好了。

    

    // Load text
    [self.textView.textStorage replaceCharactersInRange:NSMakeRange(0, 0) withString: [NSString stringWithContentsOfURL [NSBundle.mainBundle URLForResource:@"redmine" withExtension:@"txt"] usedEncoding: NULL error: NULL]
    ];
    
    
    

    

    相关文章

      网友评论

          本文标题: 国家: http://int.dpool.sina.com.c

          本文链接:https://www.haomeiwen.com/subject/byqmuttx.html