Retrieve greek characters from access database

Discussion in 'Databases' started by ras-audio, Nov 19, 2007.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Hi all,

    I recently installed my web application on discountasp.net servers and I have a problem with retrieving greek characters frommy access 2000 database. Any greek character coming from the database tablesis appeared as a questionmark, but characters hardcoded on the pageare appeared correctly (the encoding is ok).

    Has anyone experienced such a problem with the hosting provider and the support of foreign (no latin) characters using access database?

    Does anyone have a troubleshooting walkthrough on this problem?

    Thank you
    Andreas
     
  2. Hi Andreas,
    What type of page are you pulling the Access records into? (ASP, ASP.NET, PHP, XML...)
    You mention the encoding is OK, can you give an example of your method? i.e. CDATA, etc.
    Salute,
    Mark
     
  3. Hi Mark,


    You can access the page at http://rasaudiogr0.web151.discountasp.net


    The pages are ASP and the encoding on the page is "charset=windows-1253" (iso returns the same characters)


    The data are retrieved by the following method:


    query= Application("queryMainMenu")
    DBConnection.Open()
    rs= Server.CreateObject("ADODB.Recordset")
    rs.CursorLocation= 3
    rs.Open(query, DBConnection,1,3)


    if (!rs.EOF)
    {


    ...


    }
    rs.close()


    I have used the same database with a local IIS on my pc and everything is ok, but when I installed the application on discountasp.net , it seems that it's an encoding problem or a unicode characters problem.


    Regards


    Andreas


    Post Edited (ras-audio) : 11/19/2007 4:29:13 PM GMT
     
  4. OK, first of all make sure you stomp on the previously known ASP shortcomings by putting this at the top of your pages:
    <% @ LANGUAGE=VBScript CODEPAGE=1253 %>

    That ASP codepage directive will give you a two way handle.
    (inbound and outbound, from those pages.)

    Next, make sure you don't have a problem with the Access DB.
    Versions of Access DBs can cause thisproblem.
    Illustrated here: http://support.microsoft.com/kb/q222446/

    Sharing Access Databases Across Language Versions
    http://www.microsoft.com/office/ORK/2000/SIX/90T2_2.HTM
    (You may need to login with a Live ID to access that page.)

    You can also manipulate the ASP codepage if you need for debugging:
    <% Response.Write (Session.CodePage) Session.CodePage = 1253 %>
    Salute,
    Mark
     
  5. Ok I'll try these and I let you know


    Thanks

     
  6. Finally, I placed the following scripton topof each page:

    <%@ LANGUAGE="JSCRIPT" CODEPAGE=1253%>
    <%
    Session.LCID = 1032
    Session.CodePage = 1253
    Response.Charset="windows-1253"
    %>

    and this solved the problem. This ensures that the encoding will be ok and declares that the locale of the server is greek and not the default one.

    But then I had problems with some greek characters in static application variables in global.asa. I have no idea how to declare the codepage in global.asa. So I decided (the dirty way) to move them as well at the top ofeach page.

    Thank you Mark, your comments were very helpful.

    Andreas
     
  7. Glad to help Andreas, honestly.
    Thanks for providing feedback. [​IMG]
    Salute,
    Mark
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page