Recently find poll software to find LimeSurvey and Phpquestionnaire,limesurvey Chinese can be used, but relatively cumbersome. Phpquestionnaire have a Chinese package download, but installed, found Chinese display, build table or there are a variety of problems, in fact, is the Apache PHP code caused by the MySQL, to the Internet to check a pass, changed, the basic can display, built the table. A few places to summarize, so that students less to go some detours.
1.mysql has a library-level encoding, as well as a table-level (column-level?) Code, it is best to use UTF8 under Windows. If you are using a previously built library instance, it is best to look at what the encoding is. If you toss or not, simply specify when you are building a table.
$TableQuery [] = array ("Phpqadmin", "create table phpqadmin (phpqid bigint unsigned not null, version char ( not null, passwd varchar) (20) not null, template varchar ( not null, language varchar) Not null, adminlanguage varchar ( NOT NULL, SummaryLimit INT ) Unsigned not null default 10, textarealimit int unsigned not null DEFAULT 5, PopupLimit INT UNSIGNED NOT NULL DEFAULT 5, Advanceinterface enum (' y ', ' n ') NOT NULL DEFAULT ' n ', listsurvey enum (' Y ', ' n ') NOT NULL DEFAULT ' y ', timeout bigint unsigned not null, Cookiedomain varchar (255) not null) [Size=3]default CHARACTER SET UTF8 COLLATE utf8_unicode_ci[/size]");
2.mysql also has the so-called client-side code, that is, like MySQL fetch data, MySQL think should use what code to return, such as Apache PHP when fetching data in what encoding way to return, it is best to use Utf-8.
Toss not clear, simply add mysql_query ("Set names ' UTF8 '", $conn) in the MySQL connection configuration;
3. After this change, some files are saved with UTF.
4.httpd.conf php.ini do not specify the encoding
5. The template file is changed directly to <meta http-equiv= "Content-type" content= "text/html; Charset=utf-8 ">
Investigation procedure Phpquestionnaire 2.2 Chinese installation note