再问多语言的字符集有关问题,谢谢大家了

WBOY
Release: 2016-06-13 13:50:37
Original
794 people have browsed it

再问多语言的字符集问题,多谢大家了
要求中文和日文,我想就分成两个相对独立的系统运行,中文的数据就存入数据库里面的中文表,日文的数据就存入数据库里面的日文表。现在的问题是:
1.后台管理的时候,客户可能用中文的操作系统也有可能用日文的操作系统,但是后台页面上只需要中文页面就可以了,分别向中文、日文两种表里面插入值,那么这个时候页面的字符集该用什么呢?
2.数据库里面的所有表的字符集我都用的utf-8,现在我测试的时候用中文的操作系统,连接数据库之后,是不是我要往中文表里面写数据之前必须set   names   gb2312,往日文表里面写数据之前必须set   names   Shift_JIS?
3.前台是两个独立的系统在运行,中文跑中文的,日文跑日文的,分别从不同的数据库表读数据,那么这个的时候的连接数据库之后的set   names和页面的字符集又该怎么设置?


可能有点绕,多谢大家看看,万分感谢

------解决方案--------------------
SET NAMES UTF8

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!