Re: UTF8 problem

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Sun Jun 03 2007 - 03:49:37 EDT

  • Next message: marco turchi: "Re: UTF8 problem"

    On Jun 2, 2007, at 9:43 PM, marco turchi wrote:

    > | summary | longtext | utf8_general_ci | YES |
    > | description | longtext | utf8_general_ci | YES |

    I believe the third column is "collation", not "encoding"; so
    encoding is still "latin".

    > My idea is that the data are encoding UTF8 inside the table, but when
    > Cayenne creates a connection, all the data that pass through that
    > connection are encoding latin1. Is it right?

    Disclaimer *** : I've never tried the advise below myself, only found
    it in MySQL docs. So I suggest taking a full MySQL dump from your
    production DB, loading it to an offline test DB, and trying it there
    first, before applying to production.

    With ALTER DATABASE and ALTER TABLE you can change the default
    database charset and a default table charset on MySQL 5.0:

    http://dev.mysql.com/doc/refman/5.0/en/alter-database.html
    http://dev.mysql.com/doc/refman/5.0/en/alter-table.html

    Be careful with various ALTER TABLE charset options. According to the
    docs there are different ways to address a number of related but
    distinct charset conversion issues. You need to pick the one that is
    appropriate for you. So definitely do it on a test DB first.

    Good luck!
    Andrus



    This archive was generated by hypermail 2.0.0 : Sun Jun 03 2007 - 03:50:04 EDT