bernerdschaefer / akephalos

Headless HTMLUnit powered browser for Capybara
bernerdschaefer.github.com/akephalos
MIT License
336 stars 50 forks source link

Accented characters #36

Closed vinibaggio closed 13 years ago

vinibaggio commented 13 years ago

Hello,

My application is currently in Brazilian portuguese and I have to test for accented characters, for example: "Político" (theres an acute accent in the first i). Pages are rendered with accented characters correctly. The problem happens when I use Akephalos to type in some value in a text field. The result page shows up like "Pol��tico".

I've been able to fix that by changing the bin/akephalos script in order to call jRuby with the -Ku parameter:

    ruby_args = [
      "-Ku",
      "-I", "vendor:#{lib}:#{src}",
      "-r", "akephalos/server",
      "-e", "Akephalos::Server.start!(#{port.inspect})"
    ]

I would happily do a patch/pull request, but I unfortunately wasn't able to write a failing test, since tests run in the same encoding context. Is there an idea how can I be able to test this?

Thanks!

bernerdschaefer commented 13 years ago

This has been pulled in. Thanks!