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
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
mysql issues after upgrading from 1.1.2 to 1.2RC5
-
- Rank: Registered User
- Registered: Dec 31, 1969
- Last visit: Nov 02, 2009
- Posts: 47
-
- Rank: Team Member
- Registered: Sep 06, 2006
- Last visit: May 09, 2010
- Posts: 2446
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 -
- Rank: Registered User
- Registered: Dec 31, 1969
- Last visit: Nov 02, 2009
- Posts: 47
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 -
- Rank: Registered User
- Registered: Dec 31, 1969
- Last visit: Nov 02, 2009
- Posts: 47
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/ -
- Rank: Team Member
- Registered: Sep 06, 2006
- Last visit: May 09, 2010
- Posts: 2446
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 -
- Rank: Registered User
- Registered: Dec 31, 1969
- Last visit: Nov 02, 2009
- Posts: 47
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. -
- Rank: Registered User
- Registered: Dec 31, 1969
- Last visit: Nov 02, 2009
- Posts: 47
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? -
- Rank: Software Foundation
- Registered: Jul 21, 2001
- Last visit: May 31, 2010
- Posts: 624
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 -
- Rank: Registered User
- Registered: Dec 31, 1969
- Last visit: Nov 02, 2009
- Posts: 47
-
- Rank: Software Foundation
- Registered: Jul 21, 2001
- Last visit: May 31, 2010
- Posts: 624
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 -
- Rank: Software Foundation
- Registered: Jul 21, 2001
- Last visit: May 31, 2010
- Posts: 624
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 -
- Rank: Softmore
- Registered: Mar 10, 2005
- Last visit: Mar 18, 2010
- Posts: 288
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 -
- Rank: Software Foundation
- Registered: Jul 21, 2001
- Last visit: May 31, 2010
- Posts: 624
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 -
- Rank: Registered User
- Registered: Dec 31, 1969
- Last visit: Nov 02, 2009
- Posts: 47
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 -
**unknown user**
- Rank: Helper
- Registered: Mar 16, 2002
- Last visit: May 18, 2010
- Posts: 985
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.Fredricn
And as far as I remember the language was set to Swedish before upgrade, but now I can´t choose it.
- Igor
- Moderated by:
- Support
