Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Jul 2009
    Posts
    195
    Thanks
    26
    Thanked 0 Times in 0 Posts

    Foreign character displaying from godaddy webhosting database

    Hello,

    I have web hosting with godaddy. I added another domain to my hosting account, but I am planning to make that new web page in a foreign language with some different character letters of course. For just a static html page, the foreign letters are displayed correctly. However, when I try to update mysql database with foreign characters it didnt display them correctly. Even when updating the database, it enters foreign characters wrong.

    Then I went into phpmyadmin of the database and tried all sorts of things such as changing the collation of the columns to foreign characters or changing the whole database connection collation to foreign character. On top of that, as the web form updating did not enter characters properly, I even manually pasted the correct form of characters into the table in phpmyadmin. Still the website can not display the correct characters from the table.

    I talked to godaddy and other than advising to change to connection collation, they said they can not hlep further and it is a scripting issue, and they said there are many foreign websites hosted with them. They said I should modify scripting in an htaccess file and they support that file type. Can anyone advise how to do that or any other advice?

  • #2
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,495
    Thanks
    8
    Thanked 1,089 Times in 1,080 Posts
    Kentaco ... LOL
    You're like me, "having an affair" on another forum.
    I've been a part of CF much longer than WDF though.

    Hopefully you'll find an answer here ...
    I still don't have the answer

  • #3
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,853
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    Are you using mysql and php? Are you using unicode characters?
    If so, you'd need to execute the following statement before inserting/retrieving anything to/from the DB
    Code:
    mysql_query("SET names='utf-8'");
    Check the manual for more details, http://dev.mysql.com/doc/refman/5.0/...onnection.html
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #4
    Regular Coder
    Join Date
    Jul 2009
    Posts
    195
    Thanks
    26
    Thanked 0 Times in 0 Posts
    yes msleim thats right. i am still looking for the answer.

    and abduraooft yes it is php and mysql...

    Here is what I did and you guys tell me what might be wrong:

    (as the site needs to be in turkish, but i got many replies that utf8 also works for all the steps below...)


    1-I changed the connection collation of the database to: latin5_turkish_ci

    2-then I created a new table. I read from somewhere that only new tables created after this change gets affected by the change I do in #1.

    3-On that new table, in php my admin, I went into operations tab and changed the collation of the table to latin5_turkish_ci (and all the columns are collated as latin5_turkish_ci)

    4-I have two php files, one to update the database and the second one (lets say file2.php) shows info from the database. both files have something like this:

    mysql_connect($hostname,$username, $password) OR DIE ('Unable to connect to database! Please try again later.');
    mysql_select_db($dbname);

    mysql_query("SET NAMES 'latin5_turkish_ci'");

    5-in the main page file, which brings up the file2.php via a php include statement, i also have character declaration as:


    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">


    <head>


    <link rel="stylesheet" type="text/css" href="css.css" media="all"/>

    <title>............</title>
    <meta http-equiv="Content-Type" content="text/html; charset=latin5_turkish_ci" />


    (but i dont have this in file2.php that is onnly for bringing up info from database and included in the main page...or should i ?)


    So....Can anyone tell me what is wrong here? I even tried manually updating the database with correct characters in phpmyadmin...still it doesnt work...


  •  

    Posting Permissions

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