ASP Page to read arabic test

salasadi
salasadi used Ask the Experts™
on
My ASP pages include Arabic text data that come from MS Access XP that insert via ASP forms.  When I pull the data it looked like garbage (non-readable) in the site, however, I can right click and encode it to "Arabic Windows" and it will display correctly.  
I think the problem has to do with Unicode-UTF8, but not sure how to fix it in my pages.   I wish someone have an idea how to display the text correctly?

thanks
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Put a Meta Tag in the <head> section of your html page. If its UTF8 for sure, put a meta tag identifying it as unicode page, otherwise put the correct language code.

http://tlt.its.psu.edu/suggestions/international/web/tips/declare.html

Stilgar.

Author

Commented:
Stilgar,
I fix it before I get your article, however, this is the correct way. here is the tag:

<meta http-equiv=Content-Type content="text/html; charset=windows-1256">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">


you desrve the full credit :)
You only need to use one of those. No need for the two of them.

Stilgar.
Starting with Angular 5

Learn the essential features and functions of the popular JavaScript framework for building mobile, desktop and web applications.

Author

Commented:
my site work while I have both? any problem or conflict for leave them both?
I wouldn't know. Why leave both? would you want to test your site with all possible browsers to see none of them fail to render your page?

Stilgar.

Author

Commented:
I make everything as:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

everything working OK, store and retrieve.  now I am trying to do link to send email from the page.  the email address and the subject are dynamically build from the database. something like:

response.write "<tr align=right><td><a href='mailto:" & rsitem("email") & "?subject=" & rsitem("title") & "'>" & rsitem("fullname") & "</td></tr>"

since the title is Arabic UTF-8 the subject line will read garbage like:

Ù&اÙ!Ù` أسباب تعثر اÙÙ&شرÙÆع اÙØ£Ù&رÙ`Ù’Ù`

however, when I move the mouse over the mailto link it display the subject correctly in the broswer status bar.  
any idea to fix this issue?

thanks

use the iso meta tag instead of the utf one, and see if that fixes the problem.

Stilgar.
Forced accept.

Computer101
EE Admin

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial