Go Back   CodingForums.com > :: Client side development > General web building

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-03-2009, 05:43 PM   PM User | #1
ketanco
Regular Coder

 
Join Date: Jul 2009
Posts: 170
Thanks: 24
Thanked 0 Times in 0 Posts
ketanco is an unknown quantity at this point
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?
ketanco is offline   Reply With Quote
Old 07-03-2009, 11:20 PM   PM User | #2
mlseim
Master Coder

 
mlseim's Avatar
 
Join Date: Jun 2003
Location: Cottage Grove, Minnesota
Posts: 9,046
Thanks: 8
Thanked 1,029 Times in 1,020 Posts
mlseim has a spectacular aura aboutmlseim has a spectacular aura aboutmlseim has a spectacular aura about
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
mlseim is offline   Reply With Quote
Old 07-04-2009, 08:30 AM   PM User | #3
abduraooft
Supreme Master coder!

 
abduraooft's Avatar
 
Join Date: Mar 2007
Location: N/A
Posts: 14,680
Thanks: 158
Thanked 2,182 Times in 2,169 Posts
abduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really nice
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
__________________
Quote:
The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)
abduraooft is offline   Reply With Quote
Old 07-10-2009, 04:35 PM   PM User | #4
ketanco
Regular Coder

 
Join Date: Jul 2009
Posts: 170
Thanks: 24
Thanked 0 Times in 0 Posts
ketanco is an unknown quantity at this point
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...
ketanco is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:25 AM.


Advertisement
Log in to turn off these ads.