CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Oct 2006
    Posts
    123

    data was not displayed in the application in the correct format.

    The problem that we want you to help us in solving it is as follows :
    We have an excel sheet containing some data.
    We want to import this data to a mySql database to be used by a certain application.
    By importing this data through transferring it to CSV format, the data was successfully imported but the Arabic data was not displayed in the application while this data is displayed during browsing the database inside the MySql.
    If the data is entered through the application and then retrieved , the Arabic data is displayed correctly.

    We need to import this data (excel sheet) inside the MySql such that it is displayed correctly inside the application.


    Hint :I'm use UTF-8

  2. #2
    Join Date
    May 2002
    Posts
    10,943

    Re: data was not displayed in the application in the correct format.

    Since you're dealing with transfer, you need to make sure that every step has the same encoding.

    • Is your CSV properly exported in UTF-8
    • Are your database fields set to collate in UTF-8
    • After import into the database, do they retain UTF-8
    • Is your output script saved in UTF-8 (the one which handles reading from the databae)
    • Does your output page to HTML have header for UTF-8 format
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  3. #3
    Join Date
    Oct 2006
    Posts
    123

    Re: data was not displayed in the application in the correct format.

    Thanks for your reply.

    I'm consider all what you say.

    The following Scenario happen :-

    When i try to insert from my admin page the Arabic word appear and stored in db to be unreadable as the following الجÙÅ*زة

    and if i try to insert value direct to db table , i read it as the following in admin page ????

    I want to read in both Arabic

  4. #4
    Join Date
    May 2002
    Posts
    10,943

    Re: data was not displayed in the application in the correct format.

    Sounds like either #2 or #4 in my list are happening to you.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  5. #5
    Join Date
    Oct 2006
    Posts
    123

    Re: data was not displayed in the application in the correct format.

    How i can handle "Is your output script saved in UTF-8 (the one which handles reading from the databae)"

  6. #6
    Join Date
    May 2002
    Posts
    10,943

    Re: data was not displayed in the application in the correct format.

    The script that handles the passing of data to/from the database...does it have a UTF-8 header? And that script itself should be saved as a UTF-8 file.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured