Fork me on GitHub

upgrade 1.1.2 to 1.2 db gets corrupted  Bottom

  • inspite of i had latin1 string in config.php file i had

    text utf8-general-ci
    in mysql DB tables and unicode UTF-8 encoded string worked fine.
    in DB they looked like პარტიის თავმჯდომაá...
    but on generated page it was redable UTF-8 string
    after run upgrade my DB is still in ავმá but text is also diplayed დრit seems upgrade broke DB which already was in UTF-8?
  • That's a funky setup icon_wink If your tables are already in UTF8 then the config.php should read utf8 not latin1. If it's already in utf8 make sure your config.php says utf8 before your run upgrade.php

    Next, what's in your theme? The theme header should also be setting the encoding to utf8. Look at andreas08 for example, there is a tag

    Code

    <!--[charset]-->


    Let me know.

    Drak

    --
    Zikula Lead Developer
    Board Member of the Zikula Foundation
    Follow me on twitter.com/zikuladrak
  • Yep, if already in UTF8 then the upgrade will "detect" that you have it already in UTF8 in the config.php, so, it does not touch the DB encoding, Drak made a very nice upgrade process for 1.2 B-)

    --
    - Mateo T. -
    Mis principios... son mis fines
  • Quote

    That's a funky setup icon_wink

    agree. :) .
    I think some users who use UTF-8 with 1.* and postnuke series might have this setup.
    This is how i get this setup:
    1. regular install of 1.x zikula
    2. change charset in eng core and mylang core.hph to UTF-8.
    3. interface lang files are UTF-8 strings (work fine with zikula 1.2)
    4. where it is necessary for multibyte encoding change varchar's and text's max lenghts in DB.
    5. change necessary DB field to UTF-8 general ci.
    See, i did not touch encoding defined in config.php and this worked fine.it is latin1.
    in this setup i don't see UTF-8 chars in DB using phpMyAdmin. i ses რრ(3 byte sequence in my case), but zikula was getting and inserting data in DB correctly and browsers also interpreted this data as UTF-8 sequence.

    wjth new 1.2 setup yes is see data in DB (using same phpMyAdmin) correctly (readable) as UTF-8 strings.
    p.s.
    i can back up and recreate pages menus etc..but don't know what to do with News data. News module does not allow to set creation date by hand .

    i'll do some more experiments how to keep data in old way. :)

    nestormateo

    Yep, if already in UTF8 then the upgrade will "detect" that you have it already in UTF8 in the config.php, so, it does not touch the DB encoding, Drak made a very nice upgrade process for 1.2 B-)

    so upgrade looks in config.php to convert DB? :) ..
    i think i can fake that putting in config UTF-8 instead of latin1 and change it back after upgrade...
    i'll post what i get :)


    p.s.
    Question 1:
    what does it mean putting utf8 in config.php? it means UTF-8 bin or UTF-8 general-ci?
    i don't see "pure" UTF-8 option with phpMyAdmin. tried to set UTF-8 bin by hand but data gets "BLOBED"


    Question 2:
    zikula 1.xx get charset from core.php .
    from where zikula 1.2 gets charset? i see charset as charset=iso-8859-1
    in header. Curious i have lang files in UTF-8 encoding and they are displayed correctly. but they should not if charset is not UTF-8.



    edited by: shoshia, datetimebrief
  • If your data really is latin1 then you must convert it to utf8 (and the upgrade will do this for you). You can tell by looking at your tables in phpMyAdmin or similar tool. If they are already in utf8, then simple change the setting in config.php to read utf8. Actually, it really doesnt matter - if you mark config.php as latin1 and run the config with UTF8 tables, you will get a series of SKIPPED messages since the conversion process knows.

    Next update your headers so they say UTF8... or better use the charset plugin like I mentioned.

    Try it icon_smile

    Drak

    --
    Zikula Lead Developer
    Board Member of the Zikula Foundation
    Follow me on twitter.com/zikuladrak
  • strange :
    database in in utf-9 general ci
    if i have latin1 in config.php
    in page header i get iso-8859-1 and unicode text is displayed properly
    if i have
    utf8 in header i have UTF-8 and text from DB is diplayed as sequence of bytes not interpreted as UTF-8

    utf-strings from modules and core lang file are displayed correctly in both cases

    _CHARSET defined in core.php is ignored. I dont think that this is good thing, becouse you can have different charsets for different languages.

    from where charset is set? from config.php?

    DB charset can be diferent than charset diplayed on web page (DB charset ucs and displayed UTF-8) right?



    edited by: shoshia, datetimebrief
  • Send me a dump of your DB please, before the upgrade.

    Drak

    --
    Zikula Lead Developer
    Board Member of the Zikula Foundation
    Follow me on twitter.com/zikuladrak
  • As i find out it is not corrupted. just behaves strange
    with utf8 in config.php does not diplay text in unicode.
    and with latin1 in config.php text is shown in unicode :)

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