I just finished to create a web, but when i upload this web to the server, the web codification doesn’t take the accents, the accents like “ ´ ” or “ ` “, over the inserted data on the database.
I have been working on the programation on a eclipse running Windows, but the web server it’s based on Ubuntu.
The configuration of the server it’s:
Apache:
I have modified the archive /etc/apache2/conf.d/charset
AddDefaultCharset utf-8
Php5
Archive modified "/etc/php.ini"
default_charset = "utf-8"
mysql
Archive modified “/etc/mysql/my.cnf”
[client]
default-character-set=utf8
[mysql]
default-character-set=utf8
[mysqld]
init_coonect='SET collation_connection = utf8_general_ci'
init_coonect='SET NAMES utf8'
character-set-server=utf8
collation-server=utf8_general_ci
And when I check the variables of mysql with the comand show variables like “%character%”; it returns me all utf8.
html5:
<meta charset="utf-8">
create and save the archives in utf8
I save the archives in utf8
When i check the answer of http header, this answer me content-type text/html;
charset=utf8
Mysql connections
mysql_set_charset(“utf8”,$conectar_BD);
As you can see, all it’s correct, what i’m doing wrong?? Like i said before, there are two rare things.
1 If i insert the name of user with accent “´”, when I print by screen the variable that contains the name from the variable session[‘name’] it works correct, but when i print from the object it show’s a pity characters
2 How i commented before, if I do the consultation of the db on my local computer it show a correct caracters, but if i do the same consultation from the server no.