请教专家:怎样解决下载这个网站数据的乱码问题?我按以下脚本下载这个网站数据、得到的结果是乱码。
虽然我已添加了语言编码。
谢谢!
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 ) );