 |
|
 |
|
Next: History function
|
| Author |
Message |
External

Since: Feb 21, 2005 Posts: 1
|
(Msg. 1) Posted: Mon Feb 21, 2005 5:53 am
Post subject: Charset problem, Data from mysql appear wrongly Archived from groups: comp>lang>php (more info?)
|
|
|
Hello
I have build an application with php/mysql on my localhost Windows XP
(english)
My application lets you select the language which at the moment is
Greek and English.
My application is working fine on both languages but when i uploaded
it to a remote server greek doesn't work. Actually the greek that are
stored in the DB come up wrongly.
I have read many other posts regarding this problem and i have tried
many things but none works.
First of all, i have checked that both mysql servers have the same
character_set and character_set variables, so the remote DB supports
Greek.
Here is the code that initializes the DBConnection
$DBLink = mysql_connect($DBHostIP,$DBUserName,$DBPassword)
or die ("Could not connect on MySql Database");
mysql_select_db("sarafian_Agenda") or die("Could not select
database");
which resides in a function.
This was the original code with which only on my server worked in
conjuction with the correct character set in the header part of the
produced html
Having read some articles i decided to try this code in the function
$DBLink = mysql_connect($DBHostIP,$DBUserName,$DBPassword)
or die ("Could not connect on MySql Database");
mysql_select_db("sarafian_Agenda") or die("Could not select
database");
mysql_query("SET NAMES 'iso-8859-7'",$DBLink);
ini_set('mbstring.internal_encoding','iso-8859-7');
ini_set('mbstring.http_input','iso-8859-7');
ini_set('mbstring.http_output','iso-8859-7');
ini_set('mbstring.internal_encoding','iso-8859-7');
header("Content-type: text/html;charset=iso-8859-7");
iso-8859-7 is the charcter set for greek.
I have tried various combinations for the iso-8859-7 with utf-8 but i
had no luck.
I really cant understand the problem. The curious thing is that
phpMyAdmin presents the data correctly.
I have tried tracking down how it does it without succes. Both
databases are above the 40010 version that phpadmin checks.
Thank you very much >> Stay informed about: Charset problem, Data from mysql appear wrongly |
|
| Back to top |
|
 |  |
| Related Topics: | problem with charset - hi, i've some problem to print to screen and save date in mysql if the entries contain char like à,è... i try to read some post but i'm not able to solve my problem. i use easyphp 1.8 with apache 1.3.33-php 4.3.10-mysql 4.1.9 SO:windows vista home..
problem with php, json, browser, charset - Hi, I am having a problem that is occuring when using php, json, utf-8 charset and IE7. It sounds like a browser (thus client side) problem but since it is occuring on a php driven website, I think the best help I can get is here. Given: webpage (valid....
slow mysql "sending data" stage between mysql and php - Hello! I have problem: I have IPB forum installed. After search in IPB (search takes about 3-4 seconds for post table about 300 000 records) mysql shows "Sending Data" status and takes about 3-5 minutes. I tested with PHP 5.2, PHP 4.4, PHP 4....
mySQL Problem - Hi, in one of my php-scripts is the following query (with an already open db-connection): $q = "INSERT INTO main (name, img, descr, from, size, format, cat, host, link, date) VALUES ('$name', '$img', '$descr', '$user', '$size', '$format', '$cat',....
problem with php 5 and MySQL? - Hello, I have just tried to install and use MySQL v5.0.27 and php v5.2.1 on my Windows XP Pro machine. This is the second time I have tried and failed to get php v5.2.1 to work with a local web site using IIS. As soon as I try to run a php file I get.... |
|
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|
 |
|
|