go-rod / rod

A Chrome DevTools Protocol driver for web automation and scraping.

Home Page:https://go-rod.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Chinese garbled code

xiaoxuan6 opened this issue · comments

Rod Version: v0.0.0-20240401082821-6a4d1da0712a

The code to demonstrate your question

// 创建浏览器实例
browser := rod.New().MustConnect()
defer browser.MustClose()

// 新建一个页面并访问指定网址
page := browser.MustPage(homepage).MustWaitLoad()

// 修改页面的字符编码为UTF-8
page.Eval(`document.charset = "UTF-8"`)

// 等待页面加载完成后进行截图
page.MustScreenshot(img)

What you got

1713343300

Please add a valid Rod Version: v0.0.0 to your issue. Current version is v0.115.0

generated by check-issue

Use this docker image: https://go-rod.github.io/#/custom-launch?id=remotely-manage-the-launcher

# fonts
fonts-liberation fonts-noto-color-emoji fonts-noto-cjk \