Skip to content
This repository was archived by the owner on May 13, 2023. It is now read-only.

fix: use utf8 encoding for text response type #18

Merged
merged 2 commits into from
Mar 1, 2023
Merged

Conversation

Vinzent03
Copy link
Contributor

close supabase/supabase-flutter#367

From Response.body:

/// The body of the response as a string.
///
/// This is converted from [bodyBytes] using the charset parameter of the
/// Content-Type header field, if available. If it's unavailable or if the
/// encoding name is unknown, [latin1] is used by default, as per
/// [RFC 2616][].
///
/// [RFC 2616]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html

So we can either always use utf8(as changed in this pr) or the user has to specify their headers correctly.

@Vinzent03 Vinzent03 requested a review from dshukertjr February 25, 2023 13:13
Copy link
Member

@dshukertjr dshukertjr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix and the cleanup! Could we bump the version in this PR as well?

@Vinzent03
Copy link
Contributor Author

@dshukertjr Sure, done!

Copy link
Member

@dshukertjr dshukertjr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the amazing work!

@dshukertjr dshukertjr merged commit 4b16f2e into main Mar 1, 2023
@dshukertjr dshukertjr deleted the fix/encoding branch March 1, 2023 07:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Edge function responses bad encoding texts
2 participants