Skip to content

Error when retrieving UTF-8 strings from database #162

Description

@JaapJoris

When submitting a news story that has UTF-8 encoded characters in its title, the submission completes successfully but the resulting redirect produces the following error:

ArgumentError at /
invalid byte sequence in US-ASCII

For some reason, it is falsely assumed that strings returned by Redis are ASCII strings. I have fixed this problem in production by adding the following line to config.ru:

Encoding.default_external = Encoding::UTF_8

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions