-
Notifications
You must be signed in to change notification settings - Fork 7.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
experimental/desktop_photo_search doesn't handle utf8 correctly. #586
Comments
Could you give a bit more info on the issue you're seeing, please? |
30,000' explanation is that I'm incorrectly rendering search requests that contain non-latin1 characters: In digging into the problem (see https://github.com/flutter/samples/pull/587/files) I figured out a couple of things. First, our |
Thanks--indeed, looks like the issue is outside |
And outside import "package:http/http.dart";
...
var response = await get(uri);
var data = json.fuse(utf8).decode(response.bodyBytes); (Do use the |
With the above integrated in 8e0f5c4, it still trips up on the following on macOS (but renders fine in Chrome). "user": {
"id": "JzhDKu_NfNs",
"updated_at": "2020-11-08T00:33:05-05:00",
"username": "arusfly",
"name": "Arusfly 🌿",
"first_name": "Arusfly 🌿",
"last_name": null,
"twitter_username": "arusfly",
"portfolio_url": "http://www.instagram.com/vallartadiarios",
"bio": null,
"location": "Puerto Vallarta",
"links": {
"self": "https://api.unsplash.com/users/arusfly",
"html": "https://unsplash.com/@arusfly",
"photos": "https://api.unsplash.com/users/arusfly/photos",
"likes": "https://api.unsplash.com/users/arusfly/likes",
"portfolio": "https://api.unsplash.com/users/arusfly/portfolio",
"following": "https://api.unsplash.com/users/arusfly/following",
"followers": "https://api.unsplash.com/users/arusfly/followers"
},
"profile_image": {
"small": "https://images.unsplash.com/profile-1588638936205-9c639973f359image?ixlib=rb-1.2.1&q=80&fm=jpg&crop=faces&cs=tinysrgb&fit=crop&h=32&w=32",
"medium": "https://images.unsplash.com/profile-1588638936205-9c639973f359image?ixlib=rb-1.2.1&q=80&fm=jpg&crop=faces&cs=tinysrgb&fit=crop&h=64&w=64",
"large": "https://images.unsplash.com/profile-1588638936205-9c639973f359image?ixlib=rb-1.2.1&q=80&fm=jpg&crop=faces&cs=tinysrgb&fit=crop&h=128&w=128"
},
"instagram_username": "vallartadiarios ",
"total_collections": 0,
"total_likes": 61,
"total_photos": 33,
"accepted_tos": true
}, |
@mit-mit who should I chat to about
built_value
and decoding utf8 data correctly? I'm guessing I need to usecharacters
withbuilt_value
somehow?The text was updated successfully, but these errors were encountered: