[asterisk-dev] MySQL Realtime charset

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Sun May 13 07:05:06 MST 2007


On Sunday 13 May 2007, Philipp Kempgen wrote:
> I couldn't find any code in res_config_mysql.c which cares about
> setting the right charset / collation for the MySQL connection.
>
> Shouldn't there by some queries like
> SET NAMES latin1
> SET collation_connection=latin1_general_ci
> or
> SET NAMES utf8
> SET collation_connection=utf8_general_ci
> in mysql_reconnect() right before the return 1; (there might be
> native functions to do that) ?
>
> Please correct my if I'm wrong.

I believe those are set per-table at table creation time.  In any
case, trying to assume what everybody would want is a recipe for
getting it wrong.  I think it's much better to allow the database
administrator to make those kinds of decisions.

-- 
Tilghman


More information about the asterisk-dev mailing list