Skip to content

Conversation

@sadafk831
Copy link

Fixes #297

Purpose of the PR

We are having this issue for all our Arabic data received from the server as that data gets converted to some gibberish data after we use RNFetchBlob fetch as

RNFetchBlob.fetch(method, url, { 'RNFB-Response' : 'utf8',  ...headers }, body )

The proposed changes fix the issue, and again we can see the Arabic content as supposed to be.

How did I tested

  • I did same change on my local library and tested on our APP, and that worked on actual device and emulator both.
  • I read the related issues, and saw the reverted PR (Android) Fix UTF-8 related crashes #353 as that fix had the missing if/else condition which made the base64 crash, I added that check also in this PR.

@sadafk831 sadafk831 changed the title (Android) Fix multi-byte UTF-8 : Translating the non english language data (Android) Fix multi-byte UTF-8 issue : Translating the non english language data Oct 30, 2019
@sadafk831 sadafk831 changed the title (Android) Fix multi-byte UTF-8 issue : Translating the non english language data (Android) Fix multi-byte UTF-8 issue : Translating the non english language data properly Oct 30, 2019
@sadafk831
Copy link
Author

@Traviskn would be great if I can get a quick review on this as this looks like a road blocker for us.

@Traviskn
Copy link

Thank you for this PR, apologies for the slow review

@Traviskn Traviskn merged commit 577556d into joltup:master Dec 19, 2019
@mjmasn
Copy link

mjmasn commented Jan 8, 2020

Thanks for taking this one on @sadafk831 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Android RNFetchBlob.fetch doesn't decode response body as utf8, sometimes

3 participants