Forum: Ruby on Rails RE: Problem with UTF-8 AJAX search

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
E3be3af92e8756ffe1f940ac5fd57129?d=identicon&s=25 torben.wolm (Guest)
on 2005-11-23 15:05
(Received via mailing list)
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/HowToUseUn...

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/playin...
)

best regards,
torben
6805b35d0a8ea3ede0a7da2d4cf5ae77?d=identicon&s=25 jw (Guest)
on 2005-11-23 16:30
(Received via mailing list)
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 Weiss
http://blog.innerewut.de
This topic is locked and can not be replied to.