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
Puma versions >= v5.0.3 throw Encoding::CompatibilityError: incompatible character encodings: US-ASCII and UTF-16LE #2583
Comments
I can repo it, looking at it now. You mean the line that replaced several method calls? I should have seen that before, having already wrestled with another encoding issue...
|
Yeah, my guess is that's the culprit, but I haven't played around with it. |
Confirmed:
|
I've got a patch, using Windows, so ran server in WSL2/Ubuntu, saved the file in Windows Edge (browser), the shell opened the file in Excel. Still looking at a couple of things... |
Thank you for fixing this! I've confirmed the fix works. Is there an ETA for the v5.2.3 release? Thanks again! |
Thanks for testing it. Myself and @wjordan are working on code to improve Puma's handling/assembly of response bodies. I hate to ask, but PR #2595 should fix this issue, and also decrease the time Puma takes to assemble a much larger csv. If you have code that has a larger csv, I'd be interested to see whether there's a speed improvement. But, a Puma speed improvement may be 'buried' by the time the app takes to respond. Regardless, this can get fixed shortly... |
Describe the bug
We upgraded our Rails app from puma v3.12.6 to v5.2.2 and found that our CSV exports throw error:
We progressively downgraded puma and found that v5.0.2 works but v5.0.3 exhibits the error.
Puma config:
Default config from
rails new
To Reproduce
This is a clean Rails 6.1 app with only the controller action added in
app/controllers/application_controller.rb
and the puma version locked to v5.0.3. If you change puma to v5.0.2 the controller action works fine.https://github.com/jboler/puma_bug
Desktop:
The text was updated successfully, but these errors were encountered: