Jump to content

My script or the database is set to Latin1?


co.ador

Recommended Posts

I have put this little script in the code to see what kind of charset is the scrip using

<?php
$link    = mysql_connect('localhost', 'root', 'coloso'); 
$charset = mysql_client_encoding($link);

echo "The current character set is: $charset\n";?> 

 

The current character set is: latin1

 

I have the database in mysql set to utf-8 and I don't know why it is displaying through the script above that it is set to latin1?

 

I want to know if the script above it's displaying the character set of the database or the one of the script because the DB is set to UTF-8_general_ci and all the tables and TEXT, and VARCHAR fields to utf-8_general_ci

 

I don't know why it is displaying Latin1 through the script above.

 

Well I am glad to know that there is a conflict now between latin1 and utf-8 and that's what cuasing now to displaying some character which I have input in the database such as ú,á,é,í etc..

 

I am glad just need some of your help now to set up the script to utf-8 thank!!

 

 

Archived

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

×
×
  • 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.