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?
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- rgasch created topic »Using PageUtil::addVar() to load script code« 11:48 AM
- michiel responded to »password problem« 10:01 AM
- mazdev responded to »Hide "Register new account" and change template to 3 col« 07:50 AM
- mesteele101 created topic »Zikula 1.3.3 - Site Search 1.5.2 - Unable to turn off plug-ins« 07:48 AM
- mesteele101 responded to »ERR (3): E_USER_ERROR: Smarty error: [in pagesvar:pagesitem2en line XXX]…« 25. May
- mazdev responded to »Pages 2.5.0 and updating - Page not found« 25. May
- mesteele101 responded to »Zikula 1.3.3 - Selecting a category in Pages not working« 25. May
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
upgrade 1.1.2 to 1.2 db gets corrupted
-
- Rank: Softmore
- Registered: Mar 10, 2005
- Last visit: Mar 18, 2010
- Posts: 288
-
- Rank: Software Foundation
- Registered: Jul 21, 2001
- Last visit: May 31, 2010
- Posts: 624
That's a funky setup
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 tagCode
<!--[charset]-->
Let me know.
Drak
--
Zikula Lead Developer
Board Member of the Zikula Foundation
Follow me on twitter.com/zikuladrak -
- Rank: Team Member
- Registered: Sep 06, 2006
- Last visit: May 09, 2010
- Posts: 2446
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 -
- Rank: Softmore
- Registered: Mar 10, 2005
- Last visit: Mar 18, 2010
- Posts: 288
Quote
That's a funky setup
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 -
- Rank: Software Foundation
- Registered: Jul 21, 2001
- Last visit: May 31, 2010
- Posts: 624
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
Drak
--
Zikula Lead Developer
Board Member of the Zikula Foundation
Follow me on twitter.com/zikuladrak -
- Rank: Softmore
- Registered: Mar 10, 2005
- Last visit: Mar 18, 2010
- Posts: 288
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 -
- Rank: Software Foundation
- Registered: Jul 21, 2001
- Last visit: May 31, 2010
- Posts: 624
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 -
- Rank: Softmore
- Registered: Mar 10, 2005
- Last visit: Mar 18, 2010
- Posts: 288
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 :)
- Moderated by:
- Support
