Changeset 1613

Show
Ignore:
Timestamp:
04/24/08 01:23:13 (3 months ago)
Author:
Neal
Message:

Added a SET NAMES call to PostgreSQL, so that the encoding is properly set to UTF-8.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/punbb-1.3-dev/upload/include/dblayer/pgsql.php

    r1593 r1613  
    7878                if (!$this->link_id) 
    7979                        error('Unable to connect to PostgreSQL server.', __FILE__, __LINE__); 
    80                 else 
    81                         return $this->link_id; 
     80 
     81                // Setup the client-server character set (UTF-8) 
     82                if (!defined('PUN_NO_SET_NAMES')) 
     83                        pg_send_query($this->link_id, 'SET NAMES \'utf8\'') or error(__FILE__, __LINE__); 
     84 
     85                return $this->link_id; 
    8286        } 
    8387