Solved

ActiveXObject("Msxml2.XMLHTTP") for chineese characters

Posted on 2012-04-10
2
531 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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…

690 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