www.webdeveloper.com
Results 1 to 4 of 4

Thread: converting unicode to arabic data

  1. #1
    Join Date
    Sep 2012
    Posts
    3

    converting unicode to arabic data

    Hi All,

    I have a searcher in my form , on click of searcher, it displays a popup window with a list of cities in arabic language. the functionality is when i click on any of the city in the list the value should be populated in the text field in the parent window and the pop up window should get closed. I am using window.returnValue for returning the chosen value

    Issue : the value returned to the parent window from the pop up window has been changed to unicode . its like
    "%U0672%U0679%U0674". its not populating the arabic literal.

    Kindly let me know either how to convert this unicode in to arabic or let me know how to return the value in arabic instead of unicode from the pop up window to parent window

    Thanks in advance.

    Prasanna.

  2. #2
    Join Date
    Sep 2012
    Posts
    3

    Resolved

    Hi All,
    got the solution, the below code works for me.

    var cityAr = document.forms[0].citySearch.value;
    var city_ar = cityAr.replace(/%/g,'\\');
    eval("document.forms[0].citySearch.value=\""+city_ar+"\"");

  3. #3
    Join Date
    Sep 2012
    Posts
    3
    Hi All,

    got the solution, the below code works for me.

    var cityAr = document.forms[0].citySearch.value;
    var city_ar = cityAr.replace(/%/g,'\\');
    eval("document.forms[0].citySearch.value=\""+city_ar+"\"");

  4. #4
    Join Date
    Nov 2011
    Posts
    35
    maybe you can add this to page

    header('content-type: text/html; charset: UTF-8');
    <meta http-equiv="Content-type" content="text/html; charset=UTF-8" >

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles