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

Ruby 1.9 encoding issue #78

Closed
grimen opened this Issue Mar 25, 2011 · 4 comments

Comments

Projects
None yet
3 participants
@grimen

grimen commented Mar 25, 2011

Error Message:

Encoding::CompatibilityError: incompatible encoding regexp match (ASCII-8BIT regexp with UTF-8 string)

Where:

[GEM_ROOT]/gems/dalli-1.0.3/lib/active_support/cache/dalli_store.rb, line 154

This could be avoided using explicit encoding in top of course file, but I got a feeling that this is not the best-practice solution. Have anybody used Dalli with Ruby 1.9 + Rails 3 here?

@mperham

This comment has been minimized.

Show comment
Hide comment
@mperham

mperham Mar 25, 2011

Collaborator

That regexp is not a UTF-8 regexp though. \0xFF is not a valid UTF-8 character, for instance. It's truly a binary regexp so the default is correct. I'm not sure what the correct fix is and I notice that ActiveSupport appears to have the exact same unfixed problem in mem_cache_store.rb.

Collaborator

mperham commented Mar 25, 2011

That regexp is not a UTF-8 regexp though. \0xFF is not a valid UTF-8 character, for instance. It's truly a binary regexp so the default is correct. I'm not sure what the correct fix is and I notice that ActiveSupport appears to have the exact same unfixed problem in mem_cache_store.rb.

@mperham

This comment has been minimized.

Show comment
Hide comment
@mperham

mperham Mar 25, 2011

Collaborator

Force encoding for keys to handle non-ASCII content, closed by b097e45

Collaborator

mperham commented Mar 25, 2011

Force encoding for keys to handle non-ASCII content, closed by b097e45

@mperham mperham closed this Mar 25, 2011

@grimen

This comment has been minimized.

Show comment
Hide comment
@grimen

grimen Mar 25, 2011

Sweet, thanks! :)

grimen commented Mar 25, 2011

Sweet, thanks! :)

@yury

This comment has been minimized.

Show comment
Hide comment
@yury

yury Apr 14, 2011

Please, do release with this changes.

yury commented Apr 14, 2011

Please, do release with this changes.

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