Skip to content

Commit f5e0edc

Browse files
authored
Merge pull request #260 from devsonket/release-3.0.0
puppeteer utf-8 problem fix
2 parents ace6e74 + 739dbc6 commit f5e0edc

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,7 @@ yarn-error.log
6868
.pnp.js
6969
# Yarn Integrity file
7070
.yarn-integrity
71+
72+
# Thumbnails
73+
static/static/thumbnail/*.jpg
74+
!static/static/thumbnail/thumbnail.jpg

scripts/thumbnail.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@ const main = async () => {
103103
</body>
104104
</html>
105105
`
106+
page.setExtraHTTPHeaders({
107+
"Accept-Charset": "utf-8",
108+
"Content-Type": "text/html; charset=utf-8",
109+
})
106110
await page.setContent(imgHTML)
107111
await page.screenshot({
108112
type: "jpeg",

0 commit comments

Comments
 (0)