Skip to content
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

Fix encoding issues when writing non-ASCII content #125

Merged
merged 1 commit into from
Apr 5, 2022

Conversation

Morriar
Copy link
Collaborator

@Morriar Morriar commented Apr 4, 2022

This fixes the bug reported here: Shopify/tapioca#881.

I traced the problem to a combination of writing the content without specifying an encoding here while Encoding.default_internal is set to Encoding::UTF_8 by Rails here.

In these circumstances, writing the new RBI content will fail if it contains UTF-8 characters.

@Morriar Morriar added the bugfix Fix a bug label Apr 4, 2022
@Morriar Morriar requested a review from a team April 4, 2022 22:35
@Morriar Morriar self-assigned this Apr 4, 2022
@Morriar
Copy link
Collaborator Author

Morriar commented Apr 4, 2022

@ryanquanz this should fix your issue 🙏

Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
@Morriar Morriar requested a review from paracycle April 5, 2022 13:40
@Morriar Morriar merged commit 7dc2c69 into main Apr 5, 2022
@Morriar Morriar deleted the at-fix-sigil-encoding branch April 5, 2022 14:42
@shopify-shipit shopify-shipit bot temporarily deployed to production April 5, 2022 14:52 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Fix a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants