instead of escape()
> :with => "''terms='' + escape(value)",
use encodeURIComponent(), which should work fine with UTF8:
encodeURIComponent(''?????????'') =>
%D1%84%D0%B8%D0%BB%D0%BE%D1%81%D0%BE%D1%84%D0%B8%D1%8F
2006/1/29, Mikhail Shevchuk <sms512@ms.tusur.ru>:> Hello gentlemen,
>
> I''ve forced to such unicode problem:
> I have:
> <%= text_field_tag ''search'', nil, :id =>
''search'', :size => 10 %>
> <%= observe_field ''search'',
> :url => {:controller => ''article'', :action =>
''search''},
> :with => "''terms='' + escape(value)",
> :update => ''search_results'',
> :loading =>
"Element.show(''search_spinner'')",
> :loaded =>
"Element.hide(''search_spinner'')"
> %>
> in my article view, after sumbitting I get sequence like
> u0444u0438u043bu043eu0441u043eu0444u0438u044f in controller
(params[:terms]).
> How can I convert it into normal unicode? I am using UTF-8 as encoding.
>
> Thanks,
> Mikhail
>
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>