473,231 Members | 1,625 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,231 software developers and data experts.

Charset problem, Data from mysql appear wrongly

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
Jul 17 '05 #1
0 1349

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Ka | last post by:
I install a mysql server in default installation with latin charset, but I want to use GBK(a chinese charset), so that I can store and search chinese words directly. so, I download, unpack and...
0
by: Anil Garg | last post by:
Hi, I am trying to install myql on redhat. mysql package used: mysql-3.23.52-unknown-freebsdelf4.6-i386.tar.gz While following the instructions in install document..when i run the follwing...
1
by: Konstantin Kivi | last post by:
I cannot get koi8r charset working propely after I tried to switch from 4.0.x In 4.0 I have server running with --default-character-set=koi8_ru and both mysql client and servlet application did...
0
by: Wouter | last post by:
Hi, I use Windows XP, Apache2 and MySQL 4.1. I changed my default charset by adding in my php.ini: default-character-set=utf8 Some row inserts now went wrong, so I did remove it again....
0
by: | last post by:
I work with MySQL/PHP/Apache many years. I am Greek so, in many pages, I use Greek language. the problem is this: I have 2 group of programs with different interaction: group 1: PHP, MySQL...
3
by: snowweb | last post by:
I'm creating my first web application in PHP/MySQL, however, when I go to view the database contents, the data has been stored in the wrong columns. I've gone through my insertion code with a fine...
0
by: Joachim | last post by:
Environment: Windows XP - german settings. MySQL: 5.0.18-nt Database charsets have been changed from 'latin1' (where 'LOAD DATA' worked fine) to utf-8 to resolve some charset issues with...
0
by: cappa | last post by:
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...
8
by: Stefano Sabatini | last post by:
Hi all, I'm encountering this while trying to implement a factory singleton method to generate objects. The singleton has a static map which binds a static creation function defined in each...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.