flutterfire
flutterfire copied to clipboard
fix(data_connect)!: Correct UTF-8 decoding for international characters
Description
Previously, text containing characters from languages such as Korean, which are encoded in UTF-8, was not being decoded correctly. This resulted in characters appearing garbled or "broken".
This commit updates the decoding logic to properly handle UTF-8 encoding, ensuring correct display and processing of international text.
Related Issues
[firebase_data_connect] Response data Correct UTF-8 decoding for international characters Fixes #17290
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]).
This will ensure a smooth and quick review process. Updating the pubspec.yaml and changelogs is not required.
- [x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
- [x] My PR includes unit or integration tests for all changed/updated/fixed behaviors (See Contributor Guide).
- [ ] All existing and new tests are passing.
- [x] I updated/added relevant documentation (doc comments with
///). - [x] The analyzer (
melos run analyze) does not report any problems on my PR. - [x] I read and followed the Flutter Style Guide.
- [x] I signed the CLA.
- [x] I am willing to follow-up on review comments in a timely manner.
Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?
- [x] Yes, this is a breaking change.
- [ ] No, this is not a breaking change.
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
View this failed invocation of the CLA check for more information.
For the most up to date status, view the checks section at the bottom of the pull request.
Hey there thanks for the PR! Can you please add some tests for this PR?
@MichaelVerdon Thanks for the review! I've added test cases to cover the UTF-8 decoding change.
@MichaelVerdon Thanks for the review! I've added test cases to cover the UTF-8 decoding change.
Thank you this looks good! Can I get you to change 'final' to 'const' to shut the CI up. Happy to do this myself if need be. Then I am happy to approve this. 🥳
firebase_data_connect:
Analyzing ....
info - test/src/network/rest_transport_test.dart:118:7 - Use 'const' for final variables initialized to a constant value. Try replacing 'final' with 'const'. - prefer_const_declarations
1 issue found.
@MichaelVerdon Done, I've changed 'final' to 'const' to fix the lint warning. Thanks for the suggestion!
After the update on the server, i confirmed that the languages are being transferred normally from the server. I am closing this issue.