Ir para conteúdo
Fórum Script Brasil

Ruben Zevallos Jr.

Membros
  • Total de itens

    1
  • Registro em

  • Última visita

Tudo que Ruben Zevallos Jr. postou

  1. Ruben Zevallos Jr.

    Microsoft.xmlhttp

    Prezados, acho que estou com um problema velho... que é o caso dos Acentos do XHTTP no ASP com o IIS em um Windows 2003 Server Standard Inglês, com todas as configurações para o Inglês Americado. Eu fiz um sistema para ler HTML de outro endereço, para utilizar em um sistema interno... mas, infelizmente notei que o servidor de origem, o IIS acima, não retorna o código correto... Ele retorna o seguinte. Arquivo lido - http://www.wez.com.br/library/rss.htm Texto lido esperado <br /> <br /><strong>O que é RSS?</strong> getAllResponseHeaders=Content-Length: 16268 Content-Type: text/html <-- Não tem o charset=ISO-8859-1 ou UTF-8 ETag: "80ca18143cbec61:5531" X-Powered-By: ASP.NET Last-Modified: Sat, 12 Aug 2006 18:21:07 GMT statusText=OK 8 1 | < - 60 2 | b - 98 3 | r - 114 4 | - 32 5 | / - 47 6 | > - 62 7 | - 13 8 | - 10 9 | < - 60 10 | b - 98 11 | r - 114 12 | - 32 13 | / - 47 14 | > - 62 15 | < - 60 16 | s - 115 17 | t - 116 18 | r - 114 19 | o - 111 20 | n - 110 21 | g - 103 22 | > - 62 23 | O - 79 24 | - 32 25 | que - 113 26 | u - 117 27 | e - 101 28 | - 32 29 | ? - 63 30 | S - 83 31 | S - 83 32 | ? - 63 Dim objXMLHTTP Set objXMLHTTP = Server.CreateObject("Microsoft.XMLHTTP") objXMLHTTP.Open "GET", sparTarget, False objXMLHTTP.setRequestHeader "content-type", "text/html; charset=ISO-8859-1" REM Tentativas com o mesmo resultado REM objXMLHTTP.setRequestHeader "encoding", "ISO-8859-1" REM objXMLHTTP.setRequestHeader "Cache-Control", "no-store, no-cache, must-revalidate" REM objXMLHTTP.setRequestHeader "Cache-Control", "post-check=0, pre-check=0" REM objXMLHTTP.setRequestHeader "Pragma", "no-cache" objXMLHTTP.Send REM On Error Goto 0 If Err.Number = 0 Then If objXMLHTTP.Status = 200 Then Response.Write "<br />getAllResponseHeaders=" & Replace(objXMLHTTP.getAllResponseHeaders, vbCrLf, "<br />") Response.Write "<br />statusText=" & objXMLHTTP.statusText strResult = objXMLHTTP.ResponseText Response.Write "<br />" & VarType(strResult) For i = 1 To Len(strResult) Response.Write "<br />" & i Response.Write " | " & Mid(strResult, i, 1) Response.Write " - " & Asc(Mid(strResult, i, 1)) Next Response.Write "<br />Len=" & Len(strResult) Else strResult = "URL Incorrecta" End If Else strResult = Err.Description End If Set objXMLHTTP = Nothing Response.Write strResult Quando converti para ASP, usando o <% Response.Charset = "iso-8859-1" %> <br /> <br /><strong>O que é RSS?</strong> Deu certo, mas SOMENTE o HTML, não consegui mudar. O que pode estar errado?
×
×
  • Criar Novo...