Jiipee70 Posted March 10, 2010 Posted March 10, 2010 Well thats about says it all, I need to change 3 webshops to new server (within same service provider) but after site transfer and bd import, all ä and ö alphabets are replaced by ?. Thanks for any help!
MrPhil Posted March 10, 2010 Posted March 10, 2010 Does your new database have the same encoding as the old? I suspect that your old database (with the accented characters) was (the default) Latin-1, while your new one is UTF-8, or at least, the page is configured as UTF-8. A Latin-1 accented character is an invalid character on a UTF-8 page, and would show as "?" or something similar. Don't try to convert the database with existing data to Latin-1 -- it will only create a mess. Start over with re-creating the database, this time paying attention to the encoding. Also confirm that no one changed your page display encoding from Latin-1 to UTF-8. Scandinavian sites could be Latin-1, or it could be one of the other Latin-x variants, including "Baltic". Anyway, you've probably got a mismatch between database encoding, imported database content encoding, language support files, and page display encoding.
Jiipee70 Posted March 11, 2010 Author Posted March 11, 2010 Thanks for help MrPhil, I checked both old and new database settings with phpmyadmin and it says they both have "MySQL charset: UTF-8 Unicode (utf8)" so that should be correct? I got email from my SP and they suggest that I could use htaccess file with "AddCharset iso-8859-1 .php" What do you mean with re-create database (exporting again from old server?) and how can I confirm that page display has not been changed? What is interesting, it seems that pages that have been made with "information pages unlimited" shows those characters correctly.
MrPhil Posted March 11, 2010 Posted March 11, 2010 Your old system was running with UTF-8 for both the database and the page display, and so is the new one? Can you check your database dump (.sql file) to make sure it has the correct characters? If your PC is running Latin-1 or CP-1252 or some other non-UTF-8 encoding, you should see pairs of odd accented characters for each original accented character in the text. When you imported the .sql file, did you tell phpMyAdmin that the source file was UTF-8, rather than Latin-x or some other non-UTF-8 encoding? All I can think of at this point is that at some point in the database export (dump) and import process, the characters were changed to Latin-1 or some other non-UTF-8 encoding. Were any changes made to the database after importing the .sql file? Showing ? instead of the expected accented character is usually a sign that the database is serving up Latin-1 (or other single byte encoded) accented characters, while the page itself is UTF-8. In your browser, you might look to see what "character encoding" (View menu) is being used. Can you change to a different encoding and see the correct characters? It's possible that the database itself is serving up ? marks -- go into phpMyAdmin and browse some tables to see what's actually in the database. View > Page source on phpMyAdmin to see what encoding it's using to display the page -- if the table is declared as UTF-8, it ought to be displaying in UTF-8. If the text shows up as ?, try changing the page display to other encodings and see if you can get the proper character to appear. So, hopefully the database has the correct text in it (in some encoding), and it's just a mismatch of encodings for the display.
Jiipee70 Posted March 12, 2010 Author Posted March 12, 2010 Thanks again, I checked the bd dump and it has utf-8 in all other tables except "information" and "information group" tables has latin1. Option 1: Do I just change all of them to latin1? Actually at import I did not specify any character set and it seems to be utf-8 by default. Option 2: Should I then re-import and set character set to latin1? NEVERMIND, now all those sites are showing properly! I did not do anything, but SP was doing some repairs on new server and that seems to made the change. Thanks again for help!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.