Skip to content

Puma versions >= v5.0.3 throw Encoding::CompatibilityError: incompatible character encodings: US-ASCII and UTF-16LE #2583

@jboler

Description

@jboler

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:

Encoding::CompatibilityError: incompatible character encodings: US-ASCII and UTF-16LE

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:

  • OS: MacOS 10.15.7 or Ubuntu 20.04
  • Puma Version >= 5.0.3
  • Ruby 2.7.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions