!!!在不取网页代码的情况下,怎么取它的编码方式!!!

解决方案 »

  1.   

    没有办法下面是CSDN返回信息HTTP/1.0 200 OK
    Date: Wed, 06 Aug 2008 16:54:13 GMT
    Server: Microsoft-IIS/6.0
    X-Powered-By: ASP.NET
    Last-Modified: 2008-08-06 23:09:36
    Content-Length: 36647
    Content-Type: text/html
    Expires: Wed, 06 Aug 2008 16:57:13 GMT
    Set-Cookie: ASPSESSIONIDAASDARAT=LEKCNCCALMNPNOKHLOEKNBLF; path=/
    Cache-Control: Public
    X-Cache: MISS from longrujun.name
    X-Cache-Lookup: HIT from longrujun.name:80
    Via: 1.0 cache4.longrujun.name:80 (Longrujun)
    Connection: close<!-- DefaultTemplate --><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-CN" lang="zh-CN">
    <head>
    <meta name="designer" content="csdn design team">
    <meta content="all" name="robots">
    <meta http-equiv="Content-Language" content="zh-CN">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link rel="stylesheet" type="text/css" href="/u/ui/styles/default/topic.css" />
      

  2.   

    取网页头几行,因为英文不管是ansi还是utf-8都是一样的,每行都搜索charset=,看看后面是什么,就知道编码了