Changeset 993

Show
Ignore:
Timestamp:
02/07/08 10:05:37 (7 months ago)
Author:
joximu
Message:

Added: use utf8 with the database, including config var to switch off

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/CHANGELOG

    r987 r993  
    11ispCP ω 1.0.0 Changelog 
    22~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     3 
     42008-02-07 Christian Hernmarck 
     5        - GUI: 
     6                * Added: use utf8 with the database, including config var to switch off 
    37 
    482008-02-05 Benedikt Heintel 
  • trunk/configs/apache/httpd.conf

    r746 r993  
    2727 
    2828# 
     29# let the customer decide what charset he likes to use 
     30# 
     31 
     32AddDefaultCharset Off 
     33 
     34# 
    2935# Header End 
    3036# 
  • trunk/configs/ispcp.conf

    r987 r993  
    108108CMD_MYSQLDUMP = /usr/bin/mysqldump 
    109109 
     110DATABASE_UTF8 = yes 
     111 
    110112# 
    111113# Main variables 
  • trunk/gui/include/sql.php

    r764 r993  
    3737@$sql -> Connect($cfg['DB_HOST'], $cfg['DB_USER'], $cfg['DB_PASS'], $cfg['DB_NAME']) OR 
    3838        system_message('ERROR: Unable to connect to SQL server !<br>SQL returned: '.$sql -> ErrorMsg() ); 
     39 
     40/* switch optionally to utf8 based communication with the database */ 
     41if (isset($cfg['DATABASE_UTF8']) && $cfg['DATABASE_UTF8'] == 'yes') { 
     42 @$sql->Execute("SET NAMES 'utf8'"); 
     43} 
    3944 
    4045/* No longer needed */