Fork me on GitHub

mysql issues after upgrading from 1.1.2 to 1.2RC5  Bottom

Go to page 1 - 2 [+1]:

  • After upgrading from 1.1.2 to 1.2RC5 the content of the database don´t show the correct characters. The site is on Swedish and i see a lot of �.
    As I understand the database are shifting from latin1 to UTF-8, but the content doesn´t reflect that.
    This is just a test site for testing upgrade from postnuke 764 to Zikula, so it´s not vital, but we have to understand what to do to avoid this when upgrading for real.
    We are using PHP 5.2.6 and mysql 4.0.23.
    As I understand we have to upgrade to mysql 5 so that we can use some new modules that replaces some old that doesn´t exist for zikula, but that wasnt´t our primary goal at this time.

    The Zikula Software Recommendations dosn´t state what version of mysql to use, so we asume that our version is enough.

    So my question is how to avoid this when upgrading for real.



    edited by: Fredricn, datetimebrief
  • Please check your Theme Content-Type meta tag and see if it defines the charset to UTF-8 as we do on this site:

    Code

    <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />


    --
    - Mateo T. -
    Mis principios... son mis fines
  • No, it is set to
    meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"

    and I can´t find where to set UTF-8
    or do I have to hardcode that

    I can´t get the code tags to work here in forum



    edited by: Fredricn, datetimebrief
  • Have tryed to hardcode it into the theme and home.php and master.php but nothing changes.
    The address to the site is http://www.aasbo-gen.com/cms/
  • Mmmmm, if the theme is now setting the UTF-8, the only thing that comes to my mind is to check the config.php to see if there the 'dbcharset' is set to 'utf8' too :-

    --
    - Mateo T. -
    Mis principios... son mis fines
  • It Is.
    The only thing I might suspect is that the tables in the database was not transformed to UTF-8, but that I cant´t do that beacause I have more tables for other scripts that we can´t transform to UTF-8.
    In phpMyAdmin 2.11.1 I can not se what collation the tables are set to.
    I made a clean setup with Zikula 1.2RC5 on my testserver (Linux) with PHP 5.2.6 and mysql 5.0.51a and there I can see the swedish character, and in phpMyAdmin I can see that the tables is set to utf8_general_ci and the charset are set as iso-8859-1 in the andreas08 template.
    So I think that this is a mysql problem.
  • I did a upgrade on another Zikula(1.1.1) site on my testserver and that worked like a charm.
    So that strengthen my suspicion that this is a mysql problem.
    I wonder if the transforming to UTF-8 just effects the zikula tables or the whole database?
  • Themes should be updated with the following (this example is taken from the andreas08 theme which is XHTML 1.1:

    Code

    <!DOCTYPE html public "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<!--[lang]-->" dir="<!--[langdirection]-->">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=<!--[charset]-->" />


    and for XHTML 1.0 STRICT themes:

    Code

    <!DOCTYPE html public "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<!--[lang]-->" lang="<!--[lang]-->" dir="<!--[langdirection]-->">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=<!--[charset]-->" />


    --
    Zikula Lead Developer
    Board Member of the Zikula Foundation
    Follow me on twitter.com/zikuladrak
  • Tryed that and no, its not working.
  • Are you using swedish language packs (the define based ones)? If so they will need to be converted to utf8 using iconv.

    Drak

    --
    Zikula Lead Developer
    Board Member of the Zikula Foundation
    Follow me on twitter.com/zikuladrak
  • Fredricn

    It Is.
    The only thing I might suspect is that the tables in the database was not transformed to UTF-8, but that I cant´t do that beacause I have more tables for other scripts that we can´t transform to UTF-8.
    In phpMyAdmin 2.11.1 I can not se what collation the tables are set to.
    I made a clean setup with Zikula 1.2RC5 on my testserver (Linux) with PHP 5.2.6 and mysql 5.0.51a and there I can see the swedish character, and in phpMyAdmin I can see that the tables is set to utf8_general_ci and the charset are set as iso-8859-1 in the andreas08 template.
    So I think that this is a mysql problem.


    The upgrade.php will tell you if it failed to convert any tables. If it says they were converted then it was converted. You can check in phpMyAdmin or similar and if you see utf8_general_ci in the table defs then all is ok.

    Define based language packs will need to be converted utf8, but I noticed there are a lot of defines showing as _XXXX all over your site - are the defines loaded? Could you possibly email me a copy of your database and installation files so I can run some test? I would also like a copy of the pre-upgrade database. If this is possible email me at my username @zikula.org

    Drak

    --
    Zikula Lead Developer
    Board Member of the Zikula Foundation
    Follow me on twitter.com/zikuladrak
  • set charset in lang file to UTF-8.
    p.s.
    drak i think it is better to set charset for eng language to UTF-8 instead of iso-8859-1
  • shoshia

    set charset in lang file to UTF-8.
    p.s.
    drak i think it is better to set charset for eng language to UTF-8 instead of iso-8859-1


    I am not sure I follow, the entire Zikula install for all languages is utf8. Maybe I am missing something?

    Drak

    --
    Zikula Lead Developer
    Board Member of the Zikula Foundation
    Follow me on twitter.com/zikuladrak
  • Drak.
    I will put together the desired files and databases and mail them to you.
    And as far as I remember the language was set to Swedish before upgrade, but now I can´t choose it.
    Regarding the _XXXX, yes we are in the process to translate so all isn´t defined yet, but I am not worried for the language pack(we have to do it again with the new language system).
    I might found the problem. I looked at the variables in phpMyAdmin and found that the character sets in the mysql-setup is

    "latin1 big5 czech euc_kr gb2312 gbk latin1_de sjis tis620 ujis dec8 dos german1 hp8 koi8_ru latin2 swe7 usa7 cp1251 danish hebrew win1251 estonia hungarian koi8_ukr win1251ukr greek win1250 croat cp1257 latin5"

    No UTF-8

    In phpMyAdmin ver.2.11.1 (that is what our provider offer us with mysql 4.0.23) I can´t se if its latin 1 or utf8_general_ci, but on my own testserver UTF-8 is available and there a upgrade work.

    We are planing to be upgraded to mysql 5.x.x when we are going for the live site zikula upgrade.

    Thanks fo the help



    edited by: Fredricn, datetimebrief
  • Fredricn


    And as far as I remember the language was set to Swedish before upgrade, but now I can´t choose it.
    I had the same problem, but I created a dir in locale [for Dutch that's nl, don't know for Sweden... sw?] and voila, changing language worked again.

    - Igor

Go to page 1 - 2 [+1]:

This list is based on users active over the last 60 minutes.