Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert input field to UTF-8

Status
Not open for further replies.

RobBroekhuis

Technical User
Oct 15, 2001
1,971
US
I use js in a script to prepare input for an external form processor that uses UTF-8 encoding. My users want to input the information in a URL-encoded format, i.e. when they input "Amat%c3%b6rradio" into the form, I want to convert it to "Amatörradio". Is there a js function that will do that? unescape doesn't seem to work right.
Thanks

Rob
[flowerface]
 
I've made a little bit of progress. I'm now at the point where I have a string variable, let's call it "unicode", that has the hexadecimal unicode value that I want to insert into a string. I can't use:

mystring = firstbit + "\u" + unicode + lastbit

(gives an error). How do I insert the actual unicode character into a string?


Rob
[flowerface]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top