Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Problem at mySql with greek characters


Recommended Posts

Hello 2 all !


I have just setup osCommerce.


My server setup is :


Fedora Core 4

PHP Version 5.0.5

MySQL 4.1.16

phpMyAdmin 2.6.4-pl3



I have selected to use only the english version for start using encoding UTF-8 at both user and admin

I have made this change at english.php in /include/language and /admin/include/language


// charset for web pages and emails

define('CHARSET', 'UTF-8');


So now my broswer ( FireFox ) view those pages using UTF-8 encoding..


So far so good..


The problem is when i am using greek characters at categories names..

At the admin panel and user enviroment everything looks fine..


But at mysql .. what i see is something like this : ΔΦΓΓΗΞ


mySql Server variables and settings looks like this :


character set client utf8 latin1

character set connection utf8 latin1

character set database latin1 latin1

character set results utf8 latin1

character set server latin1 latin1

character set system utf8 utf8

character sets dir /usr/share/mysql/charsets/ /usr/share/mysql/charsets/

collation connection utf8_unicode_ci latin1_swedish_ci

collation database latin1_swedish_ci latin1_swedish_ci

collation server latin1_swedish_ci latin1_swedish_ci


I just don't know what to do..

I don't want to use any greek translation for my site..

but some categories and products needs to be written with greek characters..


Please.. help me..


Thanks a lot for your time,



P.S. Sorry for my poor english.. :(

Link to comment
Share on other sites

  • 3 weeks later...

Try this:


location: includes/functions/database.php

around line 16 find:


if (USE_PCONNECT == 'true') {

$$link = mysql_pconnect($server, $username, $password);

} else {

$$link = mysql_connect($server, $username, $password);



after this insert following line:

mysql_query("SET NAMES 'UTF8'", $$link);


Same way for the admin.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...