Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Encoding Problem with UTF-8


tom85

Recommended Posts

Hi everyone,

 

I'm new with OS Commerce and transfered a messy shop from a customer to my server. There I installed version v2.2 RC2.

The problem is that some characters show up in these boxes "�lfilter". Now this is what i did so far:

- downloaded database, changed encoding into UTF-8.

- changed database into "utf8_general_ci" and uploaded the database as utf-8 again.

- now the entry show up like this "Ölfilter" in the database.

- changed the encoding of the site in /includes/languages/german.php to UTF-8 as well as in the admin folder.

- I edited the previous entry directly in phpMyadmin and wrote "Ölfilter" into the description, saved and got this result again on the page: "�lfilter" instead of "Ölfilter"

- now if I change my browser to ISO-8859-1 encoding - it will show up correctly. This is strange as I changed it directly in the database where everything is utf-8 encoded.

 

The other problem is that in the E-Mails the special characters also show up like this: �

 

Is there any solution for that to fix this issue?

Does anyone have experience?

 

Sorry, I'm pretty new in all this and couldn't find anything similar to that with OSC.

Link to comment
Share on other sites

Is there any solution for that to fix this issue?

Does anyone have experience?

I have only limited experience with it but changing the database to utf8 apparently does nothing with the content already in there. I would suggest making a MySQL backup of your site using the old database. This is an sql file which is merely a text file. Then converting the text file to utf8 and resaving it. Next using that utf8 backup to populate your new utf8 database.

Link to comment
Share on other sites

When you see a ?-in-a-diamond, that means that the browser, displaying a page in UTF-8 mode, has been given an invalid character code. Most likely, the accented character is still in Latin-1 (ISO-8859-1) encoding, which is a totally bogus character as far as UTF-8 is concerned. Confirm that the page is displaying in UTF-8 ("charset"). Confirm that the database is completely UTF-8, with no default Latin-1 text fields or tables left in it ("collating"). When in phpMyAdmin looking at the table data, confirm that the (phpMyAdmin) page is displaying in UTF-8 and not Latin-1. Confirm that all your language support files (prompts, labels, etc.) are UTF-8 and not Latin-1.

 

You mentioned seeing "Ölfilter" in the database (phpMyAdmin?). That would suggest that 1) the entry contained UTF-8 data (two or more bytes for one accented character), but 2) the page was displaying in Latin-1, which infers that 3) at least part of the database is still Latin-1.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...