github-tools / github-tools/github
createBlob automatically encodes string content to UTF8
- Ngôn ngữ chính
- JavaScript
- Star
- 3.8k
- Fork
- 809
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
I have web application completely in UTF-8. I define `` and all files are saved in UTF-8 encoding. When I want to create a blob on github, the library automatically encodes the string to UTF8 representation. So it is encoded twice. In my case it breaks everything. For example it transforms `°` to `°`.
Why is this doing? I am not expert in this area but I assume that if the HTML page defines charset in meta element, web browser automatically converts strings when it sends some HTTP requests and also set up properly the HTTP headers such as `Content-Type`.
I think the automatic encoding should be removed or there should be option to turn it off? Wdyt?
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
Start at the createBlob API wrapper entry point and reproduce the reported behavior with the ° character. Trace where string content is encoded, then determine whether the expected behavior is to avoid the extra UTF-8 encoding or expose an opt-out; completion should prevent the duplicated encoding without breaking blob creation.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript
- Lĩnh vực
- api
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100