Will the following solutions be for you?
function encode_utf8( s )
{
return unescape( encodeURIComponent( s ) );
}
where do you call encode_utf8with the value of your text field? This sentence from another SO answer is found here . Not exactly the same problem, but the solution may be applicable.
Kiran source
share