?
Solved

Arabic not showing when i use Htmlencode

Posted on 2004-10-10
12
Medium Priority
?
277 Views
Last Modified: 2008-01-09
my Arabic charecters are not showing when i use server.Htmlencode(sString)..
It shows as only Numeric codes...
Wt is the solution?
0
Comment
Question by:x1877
[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
  • 6
  • 3
12 Comments
 

Author Comment

by:x1877
ID: 12274304
sorry forgot to specify... i am using asp not .net
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 14

Expert Comment

by:Thandava Vallepalli
ID: 12274316
0
 
LVL 14

Expert Comment

by:Thandava Vallepalli
ID: 12274320
after u read above link open this......

http://www.vbcity.com/forums/topic.asp?tid=3674

itsvtk
0
 
LVL 14

Expert Comment

by:Thandava Vallepalli
ID: 12274332
Here u go...

you need to use below line at the top of your all asp pages....  for htmlencode operation....

<%
Session.pagecode = 708   ' for Arabic (ASMO 708)
%>

itsvtk

0
 

Author Comment

by:x1877
ID: 12274450
u mean session.CodePage  = 708   ?
0
 
LVL 14

Accepted Solution

by:
Thandava Vallepalli earned 2000 total points
ID: 12274477
Hi,

When you use Server.HTMLEncode in the  ASP page that contains Unicode or double-byte character set (DBCS) data (in your case arabic), you may find that the data gets corrupted.

Becuase Server.HTMLEncode method does not recognize Unicode and DBCS data formats and converts the data as if it were in single-byte character set (SBCS) format.

Steps to reproduce...

1. Create an ASP page, and paste the following code into the page:
=====================
<%@ Language=VBScript codepage=950%>
<!--
This example uses a Arabic (ISO)
-->
<%
Session.CodePage = 28596
%>
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=iso-8859-6">
</HEAD>
<BODY>
<FORM action="" method=post id=FORM1 name=FORM1>
<INPUT id=txtValue name=txtValue>
<INPUT id=submit1 name=submit1 type=submit value=Submit>
</FORM>
<HR>
<%
Response.Write(Server.HTMLEncode(Request.Form("txtValue")))
%>
</BODY>
</HTML>
=====================

2. View the ASP page in a Web browser.
3. Enter a Arabic characters into the HTML textbox, and then click Submit.



Plz tell me wheter its working or not ......




If you arabic charset is different than the above plz see this link.....
http://msdn.microsoft.com/library/default.asp?url=/workshop/Author/dhtml/reference/charsets/charset4.asp


You need to modify the code in 2 places according to your charset......

1st place:
<%
  Session.CodePage = <Code Page Number>
%>

2nd Place:
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=<Preferred Charset Label>">


itsvtk





Plz read this link
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q259352
0
 

Author Comment

by:x1877
ID: 12274553
thanks for the help  itsvtk,    i will get back to you as soon as i chk all the things u send....
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

770 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