Hello Guilherme,

I added the parameter set names utf8. The following error message is displayed 
now: 

"Depending
 on your MySQL server configuration, it may not be safe to use "SET 
NAMES" to configure the connection encoding, as the underlying MySQL 
client library will not be aware of the changed character set.As a 
result, string escaping may be applied incorrectly, leading to potential
 attack vectors in combination with certain multi-byte character sets 
such as GBK or Big5. Please use the "charset" DSN option instead and 
remove the "set names utf8;" statement from the "init_queries" 
configuration parameter in databases.xml."

Best regards,

Xavier


________________________________
 De : Guilherme Aiolfi <[email protected]>
À : Xavier O <[email protected]>; Agavi Users Mailing List 
<[email protected]> 
Envoyé le : Mercredi 11 Janvier 2012 15h17
Objet : Re: [Agavi-Users] How to set the database connection with the encoding 
UTF-8 ?
 

It depends on which version your database is if I remember correctly. The 
recommend way would be use &charset=utf8 in your dsn parameter, but that 
doesn't always work. 

I'm using:

<ae:parameter name="init_queries">
    set names utf8;
</ae:parameter>

Works great.

On Wed, Jan 11, 2012 at 11:43 AM, Xavier O <[email protected]> wrote:

Hello,
>
>I created a MySQL database set with the encoding UTF-8. The problem is that 
>when I fetch data from the database, they are in another charset and the 
>special charaters are transformed to a "?". How to specify the charset in the 
>database connexion ?
>
>There is not many information in the official documentation concerning 
>localization. Where can I find more information ?
>
>Best regards,
>
>Xavier
>
>_______________________________________________
>users mailing list
>[email protected]
>http://lists.agavi.org/mailman/listinfo/users
>
_______________________________________________
users mailing list
[email protected]
http://lists.agavi.org/mailman/listinfo/users

Reply via email to