RE: Problem with UTF-8 AJAX search

That’s odd… In which browser are you seeing the problem?

Safari apparently has a problem with UTF-8 in AJAX:
http://wiki.rubyonrails.com/rails/pages/HowToUseUnicodeStrings

I’ve had the exact opposite problem, where AJAX uses UTF-8 but I need
the search text as ISO-8859-1

(the solution to that problem is presented at:
http://dema.ruby.com.br/articles/2005/07/22/playing-nice-with-ajax-and-iso-8859-1
)

best regards,
torben

The trick for me seemed to use:

$KCODE = ‘u’
require ‘jcode’

And in the view DO NOT escape the string, so just

:with => “‘search=’ + $F(‘search’)”

in the view.

best regards,
torben

Regards,
Jonathan


Jonathan W.
http://blog.innerewut.de