CSV report in Chinese and not English
See original GitHub issueDescribe the bug
When requesting statistics CSV download (http://127.0.0.1:8089/stats/requests/csv), the report is in Chinese and not English.
Expected behavior
Report in English.
Actual behavior
Generated report CSV is in Chinese.
Steps to reproduce
Start locust, run any test, click on the “Download Data” tab, choose “Download request statistics CSV”.
Environment
- OS: Ubuntu 18.04 LTS
- Python version: 3.6.9
- Locust version: 2.8.1
- Locust command line that you ran: locust
- Locust file contents (anonymized if necessary):
import time
from locust import HttpUser, task, between, constant
class QuickstartUser(HttpUser):
wait_time = between(1, 5)
@task
def view_items(self):
self.client.get("/administer-site.htm")
self.client.get("/documentPack.htm?documentPackId=1")
self.client.get("/documentPack.htm?documentPackId=2")
wait_time = constant(1)
def on_start(self):
self.client.post("/login.htm", json={"username":"redacted", "password":"redacted"})
def on_stop(self):
self.client.post("/login.htm?action=signOut")
Issue Analytics
- State:
- Created 2 years ago
- Comments:10
Top Results From Across the Web
Language Characters Issue in CSV Export - Salesmate
For example, you usually view files in English, and the CSV is in Chinese. The file will open correctly in notepad (or another...
Read more >Unicode/UTF-8 characters (Chinese characters, Barcodes, etc ...
Viewing and Editing CSV files with Unicode characters ; Open Excel from your menu or Desktop. DO NOT double-click the exported file to...
Read more >Create a csv file which including English and Chinese ...
As far as I know, the issue may be caused by that normal .csv file doesn't support Chinese characters. When we type some...
Read more >How to Export Chinese and Non-English Characters to CSV ...
Comma; Tab; Click “Next”; Click “Finish”. Note: If the file is done correctly, you should see Chinese characters in the ...
Read more >How do I export an Excel file with Chinese characters to a CSV?
Open the CSV file from Excel by clicking File > Open > Text files (.prn, ... I have tried Windows Chinese and English...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for checking. My app defaults to UTF-16, hence the Chinese characters. I’ll switch to UTF-8. This issue can be closed.
If we really wanted to we could optionally include a BOM when writing the csv file (essentially adding
encoding="utf-8-sig"
when opening the file for writing) https://stackoverflow.com/questions/57152985/what-is-the-difference-between-utf-8-and-utf-8-sigBut it is kind of considered to be invalid UTF-8 to do so https://softwareengineering.stackexchange.com/questions/372692/should-utf-8-csv-files-contain-a-bom-byte-order-mark