[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Problem displaying Arabic text from SQL server using ASP & Dreamweaver MX

Posted on 2003-11-16
7
Medium Priority
?
860 Views
Last Modified: 2012-05-04
I am developing a website using ASP and SQL server.
I am using a windows 2000 professional and dreamweaver MX for development.

The problem is that the I am getting ????? (question marks) whenever a section of any page tries to show records from the database having Arabic text.
In the same page links written in arabic show up fine, but the problem is reading from database.

My ASP files are set as follows:
codepage=1256
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1256">

What is the problem and how am i suppose to solve it?
0
Comment
Question by:Samer Kharsa
[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
7 Comments
 
LVL 21

Accepted Solution

by:
ap_sajith earned 1000 total points
ID: 9762521
Try adding this to the meta tags..
<%@CODEPAGE=1256%>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8" >.

By the way, are you running the site from NT 4.0?. It doesnt have UTF-8 Support ...Read through this article for more details..
http://msdn.microsoft.com/msdnmag/issues/0700/localize/default.aspx

Cheers!!
0
 

Assisted Solution

by:txtphile
txtphile earned 1000 total points
ID: 9777312
hi ... i am currently developing a multilanguage cms and one of languages is arabic and i had the same issue as yourself in the development cycle. If you are responsible for the content being posted into the database i would consider posting the arabic to the database as unicode. This has many advantages and i have found it useful for searching, caching and mixing the display with other langauges ...
0
 

Author Comment

by:Samer Kharsa
ID: 9786028
Can you explain how to post using unicode?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Expert Comment

by:txtphile
ID: 9786085
good point .. well basically ... and this is the odd thing, my application does it naturally. e.g


&#1588;&#1585;&#1591;&#1577; &#1603;&#1575;&#1604;&#1610;&#1601;&#1608;&#1585;&#1606;&#1610;&#1575; &#1578;&#1589;&#1583;&#1585; &#1575;&#1605;&#1585; &#1575;&#1593;&#1578;&#1602;&#1575;&#1604; &#1604;&#1604;&#1605;&#1594;&#1606;&#1610; &#1575;&#1604;&#1575;&#1605;&#1585;&#1610;&#1603;&#1610; &#1575;&#1604;&#1588;&#1607;&#1610;&#1585;&#1548; &#1608;&#1575;&#1604;&#1605;&#1583;&#1593;&#1610; &#1575;&#1604;&#1593;&#1575;&#1605; &#1604;&#1604;&#1608;&#1604;&#1575;&#1610;&#1577; &#1610;&#1572;&#1603;&#1583; &#1575;&#1606; &#1602;&#1608;&#1575;&#1606;&#1610;&#1606;&#1607;&#1575; &#1602;&#1583; &#1578;&#1594;&#1610;&#1585;&#1578; &#1576;&#1593;&#1583; &#1606;&#1580;&#1575;&#1581; &#1580;&#1575;&#1603;&#1587;&#1608;&#1606; &#1601;&#1610; &#1575;&#1604;&#1575;&#1601;&#1604;&#1575;&#1578; &#1605;&#1606; &#1602;&#1590;&#1610;&#1577; &#1605;&#1605;&#1575;&#1579;&#1604;&#1577;.

Now why is that! i remember that this was not the case when we were using a rapid dev application like mx to test the principles. i would attempt a hand written sql insert into one field from one form element. and see whether it is mx ... failing this i have a js function that converts the string from a field to demical unicode suitable for html viewing. This could be used as a middle tier to convert the string before posting it to your db insert execution. let me see if i can dig it out ...
0
 

Expert Comment

by:txtphile
ID: 9797217
no answer so i am not sure you have tried my previous comment - it would be nice to have some feedback. In the meantime this is an example of converting strings to unicode .. it is i believe the answer to how to store your arabic text.


<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
response.Write(request.form("unicode"))
response.Write("<br/><br/>")
response.Write(request.form("text"))
%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<script>

function convertToUnicodeDecFull(source)
{
    result = '';
    for (i=0; i<source.length; i++)
        result += '&#' + source.charCodeAt(i) + ';';
    return result;
}

function convert()
{
form.unicode.value = convertToUnicodeDecFull(form.text.value);
}
</script>
<form action="" method="post" name="form" id="form">
  <textarea name="text" rows="10" id="text"></textarea>
  <input type="submit" name="Submit" onclick="convert()" value="Submit">
  <input name="unicode" type="hidden" id="unicode">
</form>
</body>
</html>
0
 
LVL 7

Expert Comment

by:vnvk
ID: 12474850
This Question is now classified abandoned as no comment has been added to this question in more than 21 days.

I will leave the following recommendation on this question to the moderators in the Cleanup topic area:
    Split: ap_sajith {http:#9762521} & txtphile {http:#9777312}

Any objections should be posted here in the next 4 days. After that time, the question will be closed at the discretion of the moderator.

vnvk
EE Cleanup Volunteer
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

656 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