R软件使用htmlTreeParse解析新浪财经股票网页总是中文出现乱码。用各种编码(gb2312,utf-8等)方式都不行。

2025-04-01 03:56:02
推荐回答(1个)
回答(1):

不要用gb2312, 先转换为utf-8,
iconv(province.stock, to="utf-8")
htmlTreeParse处理后,再转换为
iconv(province.stock, to="gb2312")