[Solar-talk] I18N question

Alex Stoneham astoneham at yahoo.com
Mon Jan 21 13:49:59 CST 2008


Nice, thanks!

----- Original Message ----
From: Rodrigo Moraes <rodrigo.moraes at gmail.com>
To: solar-talk at lists.solarphp.com
Sent: Monday, January 21, 2008 11:31:25 AM
Subject: Re: [Solar-talk] I18N question


I have this code in an extended MySql adapter, to set the character
set right after connection. Don't know if it can be done in other way,
but here it is:

    /**
     *
     * User-defined configuration array. Keys are...
     *
     * 'charset':
     * (string) Character set definition.
     *
     * @var array
     *
     */
    protected $_Tipos_Sql_Adapter_Mysql = array(
        'charset' => 'utf8',
    );

    /**
     *
     * Creates a PDO object and connects to the database.
     * Set the character collation, if defined.
     *
     * @return void
     *
     */
    public function connect()
    {
        if ($this->_pdo) {
            return;
        }

        parent::connect();

        if ($this->_config['charset']) {
            $this->_pdo->exec('SET CHARACTER SET ' .
 $this->_config['charset']);
        }
    }
_______________________________________________
Solar-talk mailing list
Solar-talk at lists.solarphp.com
http://mailman-mail3.webfaction.com/listinfo/solar-talk






      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman-mail3.webfaction.com/pipermail/solar-talk/attachments/20080121/fe0285ed/attachment.html


More information about the Solar-talk mailing list