Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

createBlob automatically encodes string content to UTF8 #463

Open
dudaerich opened this issue Jul 26, 2017 · 0 comments · May be fixed by #464
Open

createBlob automatically encodes string content to UTF8 #463

dudaerich opened this issue Jul 26, 2017 · 0 comments · May be fixed by #464

Comments

@dudaerich
Copy link

I have web application completely in UTF-8. I define <meta charset='utf-8' /> 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?

dudaerich added a commit to dudaerich/github that referenced this issue Jul 27, 2017
createBlob automatically encodes string parameter
by Utf8 library. In some cases the string value
can be already encoded in Utf8 so the encoding
should be skipped.

This commit enables to pass object containing
the content and encoding items. This object is
directly sent to Github. Users have better control
about what is actually sending.

closes github-tools#463
@dudaerich dudaerich linked a pull request Jul 27, 2017 that will close this issue
dudaerich added a commit to dudaerich/github that referenced this issue Jul 27, 2017
createBlob automatically encodes string parameter
by Utf8 library. In some cases the string value
can be already encoded in Utf8 so the encoding
should be skipped.

This commit enables to pass object containing
the content and encoding items. This object is
directly sent to Github. Users have better control
about what is actually sending.

closes github-tools#463
dudaerich added a commit to dudaerich/github that referenced this issue Apr 8, 2019
dudaerich added a commit to dudaerich/github that referenced this issue Apr 9, 2019
createBlob automatically encodes string parameter
by Utf8 library. In some cases the string value
can be already encoded in Utf8 so the encoding
should be skipped.

This commit enables to pass object containing
the content and encoding items. This object is
directly sent to Github. Users have better control
about what is actually sending.

closes github-tools#463
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant