Jump to content

Recommended Posts

if you followed my instructions in my other post, the other thread

you need nothing extra, sql comes built in for greek support (utf-8 support)

 

if you are using windows, you need to have greek fonts added, go to regional settings, make sure greek is selected as an installed language

 

 

but i suspect it is not because of that, did you set the connection for mysql to utf-8 ???

and did you save you php file in utf-8, there were a bunch of steps in my thread that I linked

did you follow it???

I tried all the steps but nothing happened. Except this one 2. the connection to your database must be in that charset with the SET NAMES code. When i connect to the database i have

 

	$query = 'SELECT * FROM erotiseis ORDER BY id DESC';

$result = mysql_query($query) or die('Query failed: ' . mysql_error());

 

how should i change it to do the step you said

it is like this:

 

$connect = mysql_connect("address", "name", "password") or 
                   die ("Hey loser, check your server connection.");
mysql_select_db("mysql_name", $connect);

$sql = "SET NAMES utf8 COLLATE utf8_bin";
mysql_query($sql) or die(mysql_error());

$query = 'SELECT * FROM erotiseis ORDER BY id DESC';

$result = mysql_query($query) or die('Query failed: ' . mysql_error());

 

once you SET NAMES, basically this means this connection now sends data to and from mysql in utf-8 charset, you can run as many queries as you want after that, you only have to SET NAMES once after you connect to the database

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.