Another database character encoding question
Posted: 11 February 2008 12:41 PM   [ Ignore ]  
Summer Student
Total Posts:  17
Joined  11-21-2007

I’ve been developing on our dev server for the last month or so and am finally ready to deploy to the live box. I’ve exported all data via phpMyAdmin, created a new database and imported tables. The issue is I’m seeing strange characters. Checking posts here even my dev server looks like it shouldn’t work!

HTML page encoding is as follows:-

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

My dev server phpMyAdmin homepage shows “UTF-8 Unicode (utf8)” as charset and “utf8_unicode_ci” as connection collation. The EE tables however show “latin1_swedish_ci” as collation. Browsing a table shows some strange characters but the dev site itself looks fine.

On the live site lots of strange characters appear both in templates and from weblogs.

Any thoughts on what’s gone wrong?

Thanks very much.

EDIT:

Some extra info. My dev install shows

character_set_client   latin1
character_set_connection   latin1
character_set_database   latin1
character_set_filesystem   binary
character_set_results   latin1
character_set_server   latin1
character_set_system   utf8
character_sets_dir   /usr/share/mysql/charsets/
collation_connection   latin1_swedish_ci
collation_database   latin1_swedish_ci
collation_server   latin1_swedish_ci

and on live where I’ve now created a UTF8 db shows:-

character_set_client   latin1
character_set_connection   latin1
character_set_database   utf8
character_set_results   latin1
character_set_server   latin1
character_set_system   utf8
character_sets_dir   /usr/share/mysql/charsets/
collation_connection   latin1_swedish_ci
collation_database   utf8_unicode_ci
collation_server   latin1_swedish_ci

Hope this helps.

Thanks again.

Profile
 
 
Posted: 11 February 2008 02:22 PM   [ Ignore ]   [ # 1 ]  
Moderator
Avatar
RankRankRankRankRankRankRankRank
Total Posts:  32921
Joined  05-14-2004

What do you have set for the default character encoding in ExpressionEngine?  Also, see this recent post =)

 Signature 
Profile
MSG
 
 
Posted: 12 February 2008 04:21 AM   [ Ignore ]   [ # 2 ]  
Summer Student
Total Posts:  17
Joined  11-21-2007

Default character encoding in EE is utf-8 in both installs.

After exporting data again yesterday and adding utf8 in place of latin1 in the exported file I have everything in the live database pretty much OK except for “?” instead of “’” (single quotes). This isn’t a HUGE problem but I just need to know that the live DB is now configured correctly for future foreign character entries (I’m localising into several European languages as soon as this is sorted) and that I can export from the dev DB OK.

Thanks very much.

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 65063 Total Logged-in Users: 46
Total Topics: 82196 Total Anonymous Users: 25
Total Replies: 441740 Total Guests: 243
Total Posts: 523936    
Members ( View Memberlist )
Newest Members:  1nvidiousjaris1skinnygirlaexermk1979Andrew_IDmdutahDanielJ8Forward GearCBlalock