Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Problems with charset


Joaquim

Recommended Posts

Hi,

I've read everything I could find. I've tried everything I was advised to. But I still can't get the character set right. I believe I only have to change one file and I've done that. I must get the letters like á, ã ú and so on, to show properly. I'd like to know if there is someone who has solved this problem.

 

Thank you very much

Link to comment
Share on other sites

Hi Joaquim,

 

I'm going to assume that you are using 2.3.1 for your store. 2.3.1 utilises utf-8 for character coding within it's files this is set in includes/languages/your_language.php.

 

 

The problem you are encountering is possibly caused by your database having a incorrect collation - for some reason web hosts seem to have a default collation of latin_swedish rather than utf-8

 

changing the database involves exporting the database opening in in your plain text editor and changing all instances of:

 

DEFAULT CHARSET=latin1

 

to:

 

DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci

 

And saving

 

Now go back to your database and delete it

 

Create a new database with the same name as you just deleted but make sure it has utf8_unicode_ci collation

 

Import your updated database

My store is currently running Phoenix 1.0.3.0

I'm currently working on 1.0.7.2 and hope to get it live before 1.0.8.0 arrives (maybe 🙄 )

I used to have a list of add-ons here but I've found that with the ones that supporters of Phoenix get any other add-ons are not really neccessary

Link to comment
Share on other sites

Hi Joaquim,

 

I'm going to assume that you are using 2.3.1 for your store. 2.3.1 utilises utf-8 for character coding within it's files this is set in includes/languages/your_language.php.

 

 

The problem you are encountering is possibly caused by your database having a incorrect collation - for some reason web hosts seem to have a default collation of latin_swedish rather than utf-8

 

changing the database involves exporting the database opening in in your plain text editor and changing all instances of:

 

DEFAULT CHARSET=latin1

 

to:

 

DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci

 

And saving

 

Now go back to your database and delete it

 

Create a new database with the same name as you just deleted but make sure it has utf8_unicode_ci collation

 

Import your updated database

 

 

Hi,

I'm not reading portuguese characteres from the database (yet). It's only the translation of the site to portuguese. You can check it out here www.troca.com.pt. I'm still in the phase of seting up the store.

 

Thanks

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...