Description
What happened?
DartPad uses Latin-1 when parsing samples from the Flutter repository, even though they are UTF-8. This is likely because the server returns a content-type: application/vnd.dart
header with no charset
, and DartPad uses package:http
, which defaults to Latin-1:
Steps to reproduce problem
- Visit the following Flutter sample: https://dartpad.dev/?sample_id=rendering.BoxParentData.1&channel=stable&run=true
- Check the third headline in the source code or running example, which should read "Bugs with greater impact on developers are more valuable (maximize ΔH)"
- Notice it ends with "(maximize �H)" instead
Additional info
Here's a direct link to the line in the sample code that exposes the issue:
Browser
Browser: tested on Chrome and Safari for macOS
Version: Chrome 131.0.6778.265, Safari 18.2
Are you using any extensions/plugins that affect website behavior
(particularly those that affect iframes, such as ad blockers)? No
Are there any warnings or errors in your browser's JavaScript console?
If so, paste them below:
All logs appear to be typical for DartPad and unrelated to this issue
Machine
Operating system: macOS
Version: 14.7.2