#38 ✓resolved

  replacing doesn not work on windows or linux

Reported by gaffo | November 14th, 2008 @ 04:18 PM

On click_link_spec.rb in test: it "should treat non-breaking spaces as spaces" do The test fails in linux and windows.

It seems that in MacOS (what you're using) ruby is runs using unicode by default. However on Linux and Windows it using UTF-8, but the string coming back from the parser (nokogiri/libxml) is actually Unicode. So doing a gsub(' ', ' ') on it gives 2 unprintable characters for the match instead of the assumed single space.

So this functionality isn't actually going to work under windows or linux at the moment.

I tried using $KCODE='u' and it got better but the space character it creates is still not the same character as a real space. http://wiki.rubyonrails.org/rail...

I'm not sure when this started appearing but I think it was the same way with HPricot.

I'm not sure what to do about it:

1) Disable the feature in windows / linux 2) Punt until 1.9 (unicode support) 3) Profit!

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Ruby Acceptance Testing for Web applications.

Shared Ticket Bins

People watching this ticket