Solved

ActiveXObject("Msxml2.XMLHTTP") for chineese characters

Posted on 2012-04-10
2
517 Views
Last Modified: 2012-08-13
Hello,

I am using ActiveXObject("Msxml2.XMLHTTP") to instantiate the xmlhttp object to make a request to the server.  The responseText property has the english and chineese/Hindi characters.  The english characters are fine.  However, the chineese or hindi become funky characters.  Here is the code snippets:

------------------------------------------------------------------------------------------------------------------------------
objXMLRequest = new ActiveXObject("Msxml2.XMLHTTP"); //microsoft.xmlhttp");
objXMLRequest.open("POST", url, false);
objXMLRequest.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
 
//Make sure you escaped your strings prior to building this string.
objXMLRequest.send(a_strRequest);

//get the status response      
strReturn = objXMLRequest.responseText;

-------------------------------------------------------------------------------------------------------------------------------

the strReturn has some data like this:

----------------------------------------------------------------------------
<OPTION value="1"  >2K8SCMCOLL</option><OPTION value="2"  >नमस्तॿ</option><OPTION value="3"  >ä½ å¥½</option>
------------------------------------------------------------------------------------------------

the funky characters above are correctly stored in Chineese in DB.
0
Comment
Question by:OneCorner
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 15

Accepted Solution

by:
pateljitu earned 500 total points
ID: 37829685
Please add these lines on TOP of your ASP page:

<%
Response.CodePage = 65001
Response.CharSet = "UTF-8"

%>

also see this article for reference:
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/HTML/Q_27654707.html
0
 

Author Closing Comment

by:OneCorner
ID: 37833362
Thanks for your help!  It works perfect.
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question