Zen Cart Logo
Forums / Upgrading to 1.5.x / Random  all over my site

Random  all over my site

Views: 5,499

Results 1 to 20 of 32
21 Jan 2014, 10:38 AM
#1
kitcorsa avatar

kitcorsa

Totally Zenned

Join Date:
Feb 2007
Posts:
1,724
Plugin Contributions:
0

Random  all over my site

since upgrading from 1.3.9 to 1.5.1 my site has random

Â

all over it it random places.

any one know why??

i have been going through my products and checking the sauce and removing these one by one, but some pages I seem to be able to remove.... for example, title in EZpages and products. There is no code just text in these titles why are this random things popping up??

24 Jan 2014, 3:20 PM
#3
kitcorsa avatar

kitcorsa

Totally Zenned

Join Date:
Feb 2007
Posts:
1,724
Plugin Contributions:
0

Re: Random  all over my site

great thanks!!

21 Oct 2014, 8:17 AM
#4
romancoins avatar

romancoins

New Zenner

Join Date:
Oct 2009
Posts:
21
Plugin Contributions:
0

Re: Random  all over my site

kitcorsa:

great thanks!!

I have the same problem. I use 1.3.8a but i did not upgraded. This character "�" appeared spontaneously all over my site (ez pages, product pages, category descriptions).

I did not installed any modules or plugins lately so i jut can't explain it. The site worked perfectly for 5 years and know that happened.

I converted the database to utf-8 (same with English and configure.php) and the problem persist.

Here is how it looks on my site:
http://www.vapori.ro/vaporii_din_mediu_nu_reprezinta_acelasi_risc_ca_si_fumatul_pasiv

If any of you have an idea about to solve this mystery i appreciate it!

Janos

21 Oct 2014, 11:30 AM
#5
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,685
Plugin Contributions:
56

Re: Random  all over my site

If you do a view source, you'll find at the top of your page it has

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

This means you have more things to change. Did you set DB_CHARSET in your includes/configure.php file? And CHARSET in includes/languages/<YOUR_TEMPLATE>/YOUR_LANGUAGE.php ?

21 Oct 2014, 12:51 PM
#6
romancoins avatar

romancoins

New Zenner

Join Date:
Oct 2009
Posts:
21
Plugin Contributions:
0

Re: Random  all over my site

swguy:

If you do a view source, you'll find at the top of your page it has

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> ``` > > This means you have more things to change. Did you set DB_CHARSET in your includes/configure.php file? And CHARSET in includes/languages/<YOUR_TEMPLATE>/YOUR_LANGUAGE.php ?

Thank you for your reply! Since my earlier post i did a full site and database restore from a backup. So the changes made were not saved. I reedited the configure.php, english php both in includes and in admin.

The same result :(

21 Oct 2014, 12:57 PM
#7
romancoins avatar

romancoins

New Zenner

Join Date:
Oct 2009
Posts:
21
Plugin Contributions:
0

Re: Random  all over my site

define('DB_TYPE', 'mysql');
define('DB_PREFIX', '');
define('DB_CHARSET', 'utf8');
define('DB_SERVER', 'localhost');

This is the line added in configure.php. Maybe it should had been "utf-8" instead of "utf8"?

21 Oct 2014, 1:00 PM
#8
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,685
Plugin Contributions:
56

Re: Random  all over my site

This suggests that your data is not UTF8. Did you see the second post in this thread from Dr. Byte?

21 Oct 2014, 1:10 PM
#9
romancoins avatar

romancoins

New Zenner

Join Date:
Oct 2009
Posts:
21
Plugin Contributions:
0

Re: Random  all over my site

Attachment 14614

I attached a printscreen of my database my database was converted successfully form iso to Utf8. It was the first thing i did today when i sow the strange character appearing out of the blue. That's why i am so frustrated. I did everything by the book but nothing changes.

21 Oct 2014, 2:04 PM
#10
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Random  all over my site

romancoins:

I converted the database to utf-8

How did you do this conversion? It isn't enough to simply change the field types. The data they contain also needs to be converted.

There's a module in the plugs section of this site that will do this for you.
http://www.zen-cart.com/downloads.php?do=file&id=1318

Don't forget the usual stuff. Backup your database first.

Cheers
RodG

21 Oct 2014, 2:09 PM
#11
romancoins avatar

romancoins

New Zenner

Join Date:
Oct 2009
Posts:
21
Plugin Contributions:
0

Re: Random  all over my site

I used for the conversion DrByte's tool - the same one you pointed to. Downloaded it form here: http://www.zen-cart.com/content.php?313

I was thinking if i should change that line in english.php:

setlocale(LC_TIME, 'en_US.ISO_8859-1');

to

setlocale(LC_TIME, 'en_US.utf-8');

But i don't thing that this has anything to do with my problem. I spoke with the hosting company meanwhile - and after 2 hours of looking around my site they said it is an encoding problem somewhere.... :) voila that's technical support for you :)

21 Oct 2014, 2:21 PM
#12
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Random  all over my site

romancoins:

I used for the conversion DrByte's tool - the same one you pointed to. Downloaded it form here: http://www.zen-cart.com/content.php?313

I was thinking if i should change that line in english.php:

setlocale(LC_TIME, 'en_US.ISO_8859-1');

to

setlocale(LC_TIME, 'en_US.utf-8');
But i don't thing that this has anything to do with my problem.

On the contrary, it could have everything to do with the problem Try changing it anyway and see what happens.

romancoins:

I spoke with the hosting company meanwhile - and after 2 hours of looking around my site they said it is an encoding problem somewhere.... :) voila that's technical support for you :)

Well, yes, they are correct.

Bottom line is that you need to change any and all references of ISO_8859-1 to UTF-8 regardless of which file it is in.

Edit /admin/includes/languages/english.php (and all other language_name.php files in that folder) and set the define for CHARSET to 'utf-8'.
Do the same with the non-admin /includes/languages/english.php (and other language_name.php files in that folder)

I apologise if you've already done this too, but the fact that you are still seeing these implies that you must have missed at least one of them somewhere.

Cheers
RodG

21 Oct 2014, 2:40 PM
#13
romancoins avatar

romancoins

New Zenner

Join Date:
Oct 2009
Posts:
21
Plugin Contributions:
0

Re: Random  all over my site

Dear RodG thank you for your help! I appreciate it very much!

I changed the setlocale line to utf-8. No change.

English is my only language installed on zencart so nothing else to modify.

I think that i am looking for a lot fo manual editing. :)

12 Dec 2014, 4:01 PM
#14
heyits007 avatar

heyits007

Zen Follower

Join Date:
Sep 2010
Posts:
270
Plugin Contributions:
0

Re: Random  all over my site

I just upgraded from v1.39h to v1.53 and I had a similar problem with  characters, however I had the  problem in v1.39 also I think due to a database restore into a updated server MySQL v5.3 and PHP v5.4 environment. I ran this suggested **convert_db2utf8.php **script and it did not seem to get rid of all the  characters. Thus I still have  characters in my product descriptions, but not as many. Is there another scripted fix for this ?

Are there any other PHP files we need to modify for UTF-8 ? I checked configure.php for store and admin and also the english.php in my template.

12 Dec 2014, 4:31 PM
#15
heyits007 avatar

heyits007

Zen Follower

Join Date:
Sep 2010
Posts:
270
Plugin Contributions:
0

Re: Random  all over my site

I've noticed that charset=iso-8859-1 is in quite a few files, not just configure.php and english.php I've only followed the instructions to edit those 3 files and the configure files were already in UTF8 format from the start.

Other files identified include:

/nddbc.html
/includes/classes/class.phpmailer.php
/includes/functions/functions_email.php
/includes/functions/functions_general.php
/includes/templates/template_default/templates/tpl_zc_install_suggested_default.php

/ADMIN
/alert_page.php
/includes/header.php

Does that have any impact?

13 Dec 2014, 5:18 AM
#16
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Random  all over my site

HeyIts007:

Other files identified include:

/nddbc.html
/includes/classes/class.phpmailer.php
/includes/functions/functions_email.php
/includes/functions/functions_general.php
/includes/templates/template_default/templates/tpl_zc_install_suggested_default.php

/ADMIN
/alert_page.php
/includes/header.php

Does that have any impact?
In original ZC 1.5.3 code, any mention of iso-8859-1 in those particular files is intentional, and has nothing to do with the data coming from your database.

13 Dec 2014, 9:26 AM
#17
frank18 avatar

frank18

Deceased

Join Date:
Nov 2007
Location:
Sunny Coast, Australia
Posts:
3,427
Plugin Contributions:
2

Re: Random  all over my site

HeyIts007:

...... Is there another scripted fix for this ?.....

Not to my knowledge.

I just encountered this problem yesterday with a site of a client - inherited that site with the task to do all the maintenance....

That site had previously been upgraded from 1.3.9h to 1.5.1 (by the owner) - I did the upgrade to 1.5.3 a week ago. The site was an absolute mess, 5 additional language packs installed, some on utf-8, some on iso-8859-1 and one language pack (Romanian) with a mixed bag of both, say no more. The site displayed funny characters all over the place.

After upgrading the Italian and Spanish packs to utf-8 versions, many of the funny characters disappeared. It left me with fixing the French and Romanian packs by changing their defines to utf-8 both in admin and catalog side. Result was less funny characters again but some of the product pages have to be edited manually - no other choice as I won't risk running the convert_db2utf8.php script because most product pages are already utf8 encoded, only some are left with iso-8859-1 encoding.

To fix this, one would need to copy the affected product descriptions to a plain text editor (I use gedit in Linux) to strip all formating and from there back into the site's CKEditor, save and done. It is a tedious undertaking but it is the only option left to get this site cleaned up. You may have to do the same....

A little piece of advice: if you download a new language pack, make sure that the files in the downloaded pack are all utf-8 and that the defines in the files includes/languages/your_language.php (admin and catalog) have the definitions

// look in your $PATH_LOCALE/locale directory for available locales.. 
setlocale(LC_TIME, 'es_ES.UTF8');//unix 
setlocale(LC_TIME, 'Spanish_Spain.1252');//windows

(above example from the Spanish pack which is well maintained by torvista)

and

// charset for web pages and emails 
define('CHARSET', 'utf-8');

which are both found pretty much near the top of the files (catalog and admin side).

Sadly, many of the language packs in the Plugins section of this site have not been updated for ages..... so caution is required.

Cheers / Frank

30 Dec 2014, 4:04 PM
#18
heyits007 avatar

heyits007

Zen Follower

Join Date:
Sep 2010
Posts:
270
Plugin Contributions:
0

Re: Random  all over my site

Hmm ok. I tried that iso-8859-1 to utf8 conversion tool, which seemed to help a bit, however as you indicated, the data seems to be another issue. I have been manually doing just what you suggested. i.e. copying the text into an editor and doing a search and replace of  with null characters. This works ok, however is very tedious.

I just did a search for  characters in ZenCart Admin mode and it returned 317 product entries. Not sure if I have that many products, so I'm wondering if it means 317 occurrences of  character. Anyway t's a real pain having to manually clean out the  and other strange characters. I think someone mentioned some kind of module addon that can do this, so I might take a look at it.

Thanks,
007

30 Dec 2014, 4:23 PM
#19
heyits007 avatar

heyits007

Zen Follower

Join Date:
Sep 2010
Posts:
270
Plugin Contributions:
0

Re: Random  all over my site

Oh seems the module mentioned was really the iso-8859-1 to utf8 conversion tool, so seems like back to manual editing.

27 Jul 2017, 4:53 PM
#20
feznizzle avatar

feznizzle

Totally Zenned

Join Date:
Apr 2010
Posts:
900
Plugin Contributions:
0

Re: Random  all over my site

Dumb question... but I have to ask!

On an old zc139h, I'm attempting to follow CONVERT TO UTF8 instructions found here:
https://www.zen-cart.com/content.php?313-should-i-convert-my-store-from-iso-8859-1-to-utf8

Step one says set the define for CHARSET to 'utf-8'.
Step two says set DB_CHARSET to 'utf8'.

The first reference contains a dash (utf-8), the second does not. Is that correct?