Skip to content

Loading…

WrongEncodingError on Rails' template #1818

Closed
nanaya opened this Issue · 9 comments

7 participants

@nanaya

When a rails' template contains non-ascii, utf-8 character, rbx throws error ActionView::WrongEncodingError even though it works in mri.

steps (assuming latest bundler and rails):

  1. create new rails project
  2. generate scaffold of something (e.g. Post)
  3. insert non-ascii, utf-8 character in one of the view (e.g. '»' to posts/index)
  4. start server
  5. access the view (localhost:3000/posts/) --- here, rbx throws error while mri proceeded as normal

http://pastie.org/pastes/4267109/text

@Valve

I second on the issue, having same problem. To reproduce, insert any non latin characters into your ERB or HAML view. For example: "Привет, чуваки". This issue is a real blocker, because it prevents any non English speakers from using Rails at all! The only thing that helps is to move all string literals into locale files, but this is not always possible, for example with legacy projects.

I would gladly fix this issue, but I don't know where to look. Any help would be much appreciated.

@ognevsky

Doesn't work for me, too :(

@dizer

same problem

@IliaForm

fix it please!

@Valve

I wonder why nobody cares about this issue, if the issue is not with rubinius, but with other gems, let us know, we really need this one, but it seems it goes unnoticed.

@dbussink
Rubinius member

We care about this issue, but it requires we have more encoding stuff ready, @brixen is working hard on that.

@brixen brixen closed this in 952b52e
@brixen
Rubinius member

@Valve @IliaForm @dizer @ognevsky thanks for your patience, folks, encodings are an extremely complicated part of Ruby that touches almost everything internally. We're getting there.

@Valve

@brixen thank you for fixing this.

@brixen
Rubinius member

@Valve you're welcome! I'm still working on a few encoding issues but please let us know if you run into anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.