MySQL db问号而不是希伯来字符? [英] MySQL db question marks instead of hebrew characters..?

查看:99
本文介绍了MySQL db问号而不是希伯来字符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用PHP& MySQL的。
我的数据库在MySQL中是utf8,我的数据库表是utf8,

I'm trying to build a shopping cart using PHP & MySQL. my db in MySQL is utf8 and my table in the db is utf8,

我如何使用希伯来字符?

How can I use Hebrew characters?

推荐答案

我可以通过执行以下操作来解决这个问题:

I was able to solve this by doing the following:


  1. db排序规则必须是 utf8_general_ci

  2. 表与希伯来语的整理必须是 utf8_general_ci

  3. 在您的php连接脚本中放入头('Content-Type:text / html; charset = utf-8');

  4. 在xhtml头标中放置< meta http-equiv =Content-Typecontent =text / html; charset = utf-8 < / code>

  5. 在连接脚本中选择db后,将$ code> mysql_query(SET NAMES'utf8');

  1. the db collation has to be utf8_general_ci
  2. the collation of the table with hebrew has to be utf8_general_ci
  3. in your php connection script put header('Content-Type: text/html; charset=utf-8');
  4. in xhtml head tag put <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  5. after selecting the db in the connection script put mysql_query("SET NAMES 'utf8'");

这篇关于MySQL db问号而不是希伯来字符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆