www.webdeveloper.com
Results 1 to 5 of 5

Thread: Get Arabic to appear correctly in both static HTML and database text

  1. #1
    Join Date
    Oct 2008
    Posts
    92

    Get Arabic to appear correctly in both static HTML and database text

    I am trying to get my asp classic vbscript page to render Arabic script correctly.

    I can get the HTML to display the Arabic characters correctly by simply adding the following line at the top:

    Code:
    <html dir="rtl" lang="ar" xml:lang="ar" xmlns="http://www.w3.org/1999/xhtml">
    This works for all Arabic script within HTML and all response.write calls that do not pull text from the database.

    However when the Arabic text is pulled from the access database, it comes up as a bunch of wierd symbols, see the example here:

    http://explorethemed.com/mapsar2.asp


    I tried adding this to the top of the page:

    Code:
    <%
    Session.LCID = 1032
    Session.CodePage = 1256
    Response.Charset="windows-1256"
    %>
    This fixes the text that is pulled from the database but it screws up all the Arabic symbol in the regular HTML text on the page, see the example here:

    http://explorethemed.com/mapsar.asp

    So how do I encode the page so that both the Arabic in the HTML text and that is pulled from the database appears correctly?

  2. #2
    Join Date
    Oct 2008
    Posts
    92
    Nevermind, I fixed it.

    I had to change the charset to 1256 in the meta-http equiv tag aswell.

  3. #3
    Join Date
    Oct 2012
    Location
    United States
    Posts
    19
    That's great. Do you speak Arabic by the way or are you working on this for a client?

  4. #4
    Join Date
    Oct 2012
    Posts
    47
    I have been trying to find a solution for the past few hours but is unable to do so. I have tried all possible solutions on the web but nothing forum this seems to be working. And here lies the problem.

  5. #5
    Join Date
    Oct 2012
    Location
    United States
    Posts
    19
    What is your email? Maybe I can help you if its a simple job
    Quote Originally Posted by TheTechguys View Post
    I have been trying to find a solution for the past few hours but is unable to do so. I have tried all possible solutions on the web but nothing forum this seems to be working. And here lies the problem.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles