请教专家:怎样解决下载这个网站数据的乱码问题?我按以下脚本下载这个网站数据、得到的结果是乱码。
虽然我已添加了语言编码。
谢谢!
u="http://basic.10jqka.com.cn/600000/equity.html";d1=Open(u,HTML Table(3,Column Names(1),Data Starts(2)),Charset("gb2312"));


Automation and ScriptingRe: 請教專家:怎樣解決下載這個網站資料的亂碼問題?嘗試這樣的事情
u="https://www.w3schools.com/html/html_tables.asp";
blobdata = loadtextfile(u,blob);
//blobdata=blobpeek(blobdata,0,47939)||hextoblob("20CDE2")||blobpeek(blobdata,47939);// insert 外 https://en.wikipedia.org/wiki/GB_2312
chardata = blobtochar(blobdata,"gb2312");
filename = savetextfile("$temp/deleteme.html",chardata);
d1=Open(filename,HTML Table(1));
將資料下載為 blob。
使用 GB2312 編碼將 blob 轉換為字元資料。
保存角色資料;它將在磁碟上以 UTF8 編碼。
打開已儲存的文件。
the blobpeek offset was chosen very carefully to but the character here.the blobpeek offset was chosen very carefully to but the character here.the blobpeek offset was chosen very carefully to but the character here.the blobpeek offset was chosen very carefully to but the character here.the blobpeek offset was chosen very carefully to but the character here.blobpeek 偏移量的選擇非常仔細,但這裡的字元。
Re: 請教專家:怎麼解決下載這個網站資料的亂碼問題?感謝專家!
我試著依照修改、但不能這樣下載

Re: 請教專家:怎麼解決下載這個網站資料的亂碼問題?感謝各位專家!
奇怪、今天試同樣的程式碼、它能正常了、但結果還是亂碼

Re: 請教專家:怎麼解決下載這個網站資料的亂碼問題?u="http://basic.10jqka.com.cn/600000/equity.html";
txt = loadtextfile(u,blob);<BR />
它不工作。謝謝!
Re: 請教專家:怎麼解決下載這個網站資料的亂碼問題?可能有翻譯問題。
我認為你說的是它沒有起作用。
我猜它需要用戶名和密碼。
如果我錯了,你需要給我更多資訊。
以下是提供基本身份驗證密碼的方法。
您可能需要使用 https 而不是 http。
//u = "http://basic.10jqka.com.cn/600000/equity.html";
u = "https://www.w3schools.com/html/html_tables.asp";
blobdata = New HTTP Request(
URL( u ),
Method( "GET" ),
Username( "ross" ),
Password( "Abc123" )
) << Send( "blob" );
chardata = Blob To Char( blobdata, "gb2312" );
filename = Save Text File( "$temp/deleteme.html", chardata );
d1 = Open( filename, HTML Table( 1 ) );