dsaf415212 2013-03-31 15:48
浏览 40

无法辨认的人物utf8

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.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 基于卷积神经网络的声纹识别
    • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
    • ¥100 为什么这个恒流源电路不能恒流?
    • ¥15 有偿求跨组件数据流路径图
    • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
    • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
    • ¥15 CSAPPattacklab
    • ¥15 一直显示正在等待HID—ISP
    • ¥15 Python turtle 画图
    • ¥15 stm32开发clion时遇到的编译问题