Zen Cart Logo
Forums / General Questions / language utf8 working and not working

language utf8 working and not working

Views: 1,494

Results 1 to 13 of 13
22 Jan 2013, 2:30 AM
#1
marieaa avatar

marieaa

Zen Follower

Join Date:
Jan 2013
Posts:
113
Plugin Contributions:
0

language utf8 working and not working

I've been stucked on this for so long and have read so many posts that my eyes are crossed...

I need the cart to be in french with the usual language caracters. I followed instructions on how to change everything that needed to be to utf8 and all of a sudden everything to do with products I could type in the real caracter instead of the varation of it (ex. é instead of é) and it shows properly on the screen and properly in the meta as well.

However, anything that shows in the headermenu or the sideboxes or the footer doesn't work... I get the weird ? ... if I define the language files with the é for instance, it does show properly on my webpage but not so on the meta tags.

So went in search found tons of information... tried a lot of what I saw.. but can't get it fixed.

I went and checked my database and so far all show utf8_general_ci as it should be from what I understood. I did the my_db_charset.php file recommended by Dr Bytes just in case, it didn't fix it.

So basically, all my products show ok... and the language define pages. I don't get it.

Anyone have any idea what I missed or did wrong?

22 Jan 2013, 2:56 AM
#2
marieaa avatar

marieaa

Zen Follower

Join Date:
Jan 2013
Posts:
113
Plugin Contributions:
0

Re: language utf8 working and not working

forgot to list what I did:

changed set local in both admin and includes in my english.php page to utf8 and tried the my_db_charset

also changed the configure files ('DB_CHARSET','utf8')

I did not touched the query_factory file as instructed.

I'm also rechecking the database through phpMyAdmin to make sure Id idn't miss one.

Thanks in advance

22 Jan 2013, 3:05 AM
#3
marieaa avatar

marieaa

Zen Follower

Join Date:
Jan 2013
Posts:
113
Plugin Contributions:
0

Re: language utf8 working and not working

also this:

added the utf8 to function_general.php if (function_exists('iconv')) $string = iconv("Windows-1252", "UTF-8//IGNORE", $string);

same to function_email.php $mail->CharSet = (defined('CHARSET')) ? CHARSET : "UTF-8";

class.phpmailer.php var $CharSet = "UTF-8";

22 Jan 2013, 2:09 PM
#4
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,096
Plugin Contributions:
56

Re: language utf8 working and not working

Are you saving all your language files using the 'UTF-8 without BOM' encoding? That was one of the things that bit me during my UTF-8 conversion.

22 Jan 2013, 9:41 PM
#5
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,873
Plugin Contributions:
7

Re: language utf8 working and not working

a link to your site would help

23 Jan 2013, 12:43 AM
#6
marieaa avatar

marieaa

Zen Follower

Join Date:
Jan 2013
Posts:
113
Plugin Contributions:
0

Re: language utf8 working and not working

Torvista

sorry... here is the link...

http://aigui-arts.com/boutique/

Lat9

I only have the one language. I need the site to be french only at this time so after trying to have it default to french only and failing because it was always reverting back to english, I then switched the files... all my language files although called english so the cart would recognize whatever was in there as the default language, the "writings" in them are in french... and from what I read, I was to make everything utf8 all over which I did.

The only thing I`m unsure about is if my changing my database to utf8_general_ci after the creation of the cart database could be the problem... although, when I look at my backup from prior the change, it says utf8 on it same as the latest backup... so I assumed it was all ok... but read in my research that I should purposely set the database to the new setting.

let me rephrase the only thinkIm sure about is that I`m lost... :smile:

23 Jan 2013, 12:47 AM
#7
marieaa avatar

marieaa

Zen Follower

Join Date:
Jan 2013
Posts:
113
Plugin Contributions:
0

Re: language utf8 working and not working

here just in case it would save time... this is a product page where the é caracter is used and shows as it should on the product itself... but you can see that the sideboxes and the header are not behaving

http://aigui-arts.com/boutique/index.php?main_page=product_info&cPath=1_5&products_id=2

the name of the product is as it should... the É in Économie right under the price isn`t.... and the test I did in the description part itself are showing as should

23 Jan 2013, 12:56 AM
#8
marieaa avatar

marieaa

Zen Follower

Join Date:
Jan 2013
Posts:
113
Plugin Contributions:
0

Re: language utf8 working and not working

Ive also figured out so far that anything that I type in through Admin such as the category names and such, the caracters show as they should... its basically everything coming out of my language files that`s misbehaving.

23 Jan 2013, 1:17 AM
#9
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,873
Plugin Contributions:
7

Re: language utf8 working and not working

anything that I type in through Admin such as the category names and such, the caracters show as they should

er, not in my browser. I see corrupt category names which come from the db, and corrupt text from the language files.There are errors whichever encoding you use which means you have multiple problems...hence your difficulty in fixing them.
Install a new copy of Zen Cart to play with, drop in your french files and check EVERYTHING displays ok. If not, find an dfix the encoding of the offending file.
Once all is fixed, copy them back to your shop and check they STILL all display ok.

Then, look at the databse connection db_charset as explained in this thread:
http://www.zen-cart.com/showthread.php?153582-ability-to-define-DB_CHARSET-in-v1-3-9
and ensure your collation is utf-8 on all your db tables.

THEN correct manually through the admin the corrupt text that displays in the product descriptions and categories.

23 Jan 2013, 1:53 AM
#10
marieaa avatar

marieaa

Zen Follower

Join Date:
Jan 2013
Posts:
113
Plugin Contributions:
0

Re: language utf8 working and not working

I will do as you advise... but so I can understand, what browser are you using and do the categories show like this:

Cat�gories

Cours-> (4)

   Broderie Machine (2)

   Courtepointe

   Couture (2)

   Crochet

Broderie à la Machine

Courtepointe

Couture

Machines-> (1)

Tricot & Crochet->

Certificat Cadeau (1)


Tous les Produits ...

Sp�ciaux ...

23 Jan 2013, 1:56 AM
#11
marieaa avatar

marieaa

Zen Follower

Join Date:
Jan 2013
Posts:
113
Plugin Contributions:
0

Re: language utf8 working and not working

I guess I`m asking if this part here:

Tricot & Crochet->

does it show like that for you?

Because I take the time to view my site in both IE and Firefox to make sure I do right in both... but now I`m getting scared that I should do it differently. Knowing your browser I guess will give me one more option.

23 Jan 2013, 2:46 AM
#12
marieaa avatar

marieaa

Zen Follower

Join Date:
Jan 2013
Posts:
113
Plugin Contributions:
0

Re: language utf8 working and not working

ok I did as advised... installed in a new folder... then changed one file... just one file and oops... everything goes wrong again... the file is

includes/languages/english.php... so I went back and put the original english file and just change the define categories to CATÉGORIES... and I get a corrupted caracter on the sidebox Categories.

Im getting really confused here. I thought that v.1.5.1 was utf8 but I guess it isnt... or Im understanding this all wrong. So Ill try once again with changing the en_US to utf8 and see what happens unless you advise otherwise.

thanks for your help. truly appreciated.

and sorry if I sound like a whiner... don`t mean to...

but just to clear up things... I should be spelling Catégories and not Catégories... right?

27 Jan 2013, 11:50 PM
#13
marieaa avatar

marieaa

Zen Follower

Join Date:
Jan 2013
Posts:
113
Plugin Contributions:
0

Re: language utf8 working and not working

the problem is mostly fixed thanks for Torvista... now, the text gets corrupted only when I log in as a customer so I will keep on searching.