Sinatra + ruby1.9 + utf8 = incompatible character encodings #27

Closed
rriemann opened this Issue May 30, 2010 · 5 comments

Comments

Projects
None yet
5 participants
@rriemann

https://rails.lighthouseapp.com/projects/8994/tickets/2188-i18n-fails-with-multibyte-strings-in-ruby-19-similar-to-2038

The problem mentioned in the link abouve seems to apply in the case of sinatra, too.

using form data with special utf8 chars like ß,ü,ö causes an error:
Internal Server Error
incompatible character encodings: UTF-8 and ASCII-8BIT

With ruby1.8 everything works fine.

@johnmuhl

This comment has been minimized.

Show comment Hide comment
@johnmuhl

johnmuhl May 31, 2010

i believe http://goo.gl/4PvG is related to this as well.

i believe http://goo.gl/4PvG is related to this as well.

@pirj

This comment has been minimized.

Show comment Hide comment
@pirj

pirj May 31, 2010

Encoding.default_external = 'UTF-8' if "1.9".respond_to?(:encoding)

solves the issue for HAML and works with 1.8.6, 1.8.7 and 1.9.1 i worked with
hope it will help with ActionView, too

pirj commented May 31, 2010

Encoding.default_external = 'UTF-8' if "1.9".respond_to?(:encoding)

solves the issue for HAML and works with 1.8.6, 1.8.7 and 1.9.1 i worked with
hope it will help with ActionView, too

@colszowka

This comment has been minimized.

Show comment Hide comment
@colszowka

colszowka Aug 16, 2010

What's the best way to test this using rack-test on a Sinatra app?

What's the best way to test this using rack-test on a Sinatra app?

@rkh

This comment has been minimized.

Show comment Hide comment
@rkh

rkh Sep 7, 2010

Owner

Fixed by #56.

Owner

rkh commented Sep 7, 2010

Fixed by #56.

@rkh

This comment has been minimized.

Show comment Hide comment
@rkh

rkh Sep 25, 2010

Owner

Fix has been merged.

Owner

rkh commented Sep 25, 2010

Fix has been merged.

zzak added a commit to sinatra/sinatra-contrib that referenced this issue Aug 19, 2013

7stud pushed a commit to 7stud/sinatra that referenced this issue Aug 27, 2014

Merge pull request #27 from tienle/master
Pull request for changing wild.markdown

zzak pushed a commit that referenced this issue Aug 12, 2016

Merge pull request #27 from spagalloco/escapenils
allow cache-breaker params in EscapedParams

This issue was closed.

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