VB unicode 页面(又被吃掉了,怎么回事?)

来源:百度知道 编辑:UC知道 时间:2024/05/15 03:37:39
我贴出一部分乱码好了
 ?html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
<title>柍柶袅背婥岺帠巑傪捛偄弌偣僷乕僩2</title>
<body bgcolor=#efefef text=black link=blue alink=red vlink=#660099>
<a href="http://ofuda.cc/"><img width="400" height="15" alt="傕偆18帪偐丄" border="0" src="http://e.ofuda.cc/disp/1001000000010000/00813400.gif" ALT="柍桠倾僋僙僗僇偻儞伪乕ofuda.cc
就是这个样子!

好了,我这样说:
gimpo.2(hx)c(hx)h(hx).net/test/read.cgi/kaden/1223701996/
这个页面!我现在要获取到它的代码,并且放进一个变量里以便供我处理字符,一般的方法没有用
用什么都可以,下载过来再读取再转换什么的都行,速度快就OK ,但不要用WebBrowser1.Document.body.outerHTML,慢的要死还占CPU(虽然这个可以直接得到代码而且不会有乱码,感觉非常好,就是太慢了)

吞了我两次了几百分都没,

总算明白你的意思了
这和你用什么方式下载页面没有关系
页面就是一个文件,用什么方式下下来都是一样的
关键在于VB6.0无法正确解析Shift_JIS这种编码
【你下的页面是用shift_JIS编码的,VB6.0却用自己默认的编码(我不知道是哪种)去解读它,当然会出现乱码。记事本应该也不支持这个shift_JIS】

你现在要解决的问题是怎么把Shift_JIS编码转成你想要的编码

稍等给你个class
+++++++++++++++++++++++++++++++++++++++++++

Public Function Utf8ToUnicode(ByRef Utf() As Byte) As String
Dim utfLen As Long

utfLen = -1
On Error Resume Next
utfLen = UBound(Utf)
If utfLen = -1 Then Exit Function

On Error GoTo 0

Dim i As Long, j As Long, k As Long, N As Long
Dim b As Byte, cnt As Byte
Dim Buf() As String
ReDim Buf(utfLen)

i = 0
j = 0
Do While i <= utfLen
b = Utf(i)

If (b And &HFC) = &HFC Then
cnt = 6
ElseIf (b And &HF8) = &HF8 Then
cnt = 5
ElseIf (b And &HF0) =