[GH-ISSUE #1345] script export file unreadable code (中文乱码) #1338

Open
opened 2026-03-03 19:50:38 +03:00 by kerem · 2 comments
Owner

Originally created by @ibmsoft on GitHub (Sep 2, 2022).
Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/1345

Originally assigned to: @NghiaTranUIT on GitHub.

Proxyman version? (Ex. Proxyman 1.4.3)

3.8.0

macOS Version? (Ex. mac 10.14)

12.5.1

Steps to reproduce

`function onResponse(context, url, request, response) {

// Write to single file

// Write the Body to file with flow ID
writeToFile(response.body, "~/Desktop/sample-" + context.flow.id+".html");

// Done
return response;
}`

Expected behavior

normal

err
Originally created by @ibmsoft on GitHub (Sep 2, 2022). Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/1345 Originally assigned to: @NghiaTranUIT on GitHub. ### Proxyman version? (Ex. Proxyman 1.4.3) 3.8.0 ### macOS Version? (Ex. mac 10.14) 12.5.1 ### Steps to reproduce `function onResponse(context, url, request, response) { // Write to single file // Write the Body to file with flow ID writeToFile(response.body, "~/Desktop/sample-" + context.flow.id+".html"); // Done return response; }` ### Expected behavior normal <img width="427" alt="err" src="https://user-images.githubusercontent.com/26042/188034535-a3418dd0-18b4-47c6-a728-b6af8cbcdcf2.png">
Author
Owner

@NghiaTranUIT commented on GitHub (Sep 2, 2022):

Hey, @ibmsoft look the problem is the encoding. Can you share with me the URL that you've tested? I'd like to reproduce it on my end 👍

<!-- gh-comment-id:1234956777 --> @NghiaTranUIT commented on GitHub (Sep 2, 2022): Hey, @ibmsoft look the problem is the encoding. Can you share with me the URL that you've tested? I'd like to reproduce it on my end 👍
Author
Owner

@NghiaTranUIT commented on GitHub (Sep 4, 2022):

Hey @ibmsoft, I investigated and discover the problem due to the string encoding.

Your website is using <meta charset="utf-8">, but it contains invalid characters. Currently, Proxyman only supports UTF-8 String, so some characters are missing.

<!-- gh-comment-id:1236232946 --> @NghiaTranUIT commented on GitHub (Sep 4, 2022): Hey @ibmsoft, I investigated and discover the problem due to the string encoding. Your website is using `<meta charset="utf-8">`, but it contains invalid characters. Currently, Proxyman only supports UTF-8 String, so some characters are missing.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Proxyman#1338
No description provided.