Forums / Upgrading to 1.5.x / question marks (?) on products_name and products_description

question marks (?) on products_name and products_description

Views: 1,201

Results 1 to 9 of 9
4 Jan 2013, 2:52 PM
#1
genesissystem avatar

genesissystem

New Zenner

Join Date:
Jun 2009
Posts:
26
Plugin Contributions:
0

question marks (?) on products_name and products_description

I upgrade to 1.5.1
my problem is went we move the db to the new server I got funny letters like question marks (?)
on products_name and products_description

see here the old server here you dont see question marks (?)
http://74.54.20.226/~medic/shopping/index.php?main_page=product_info&cPath=1_20&products_id=159

see here the new server here you see question marks (?)
http://www.medicalequipmentfl.com/sh/index.php?main_page=product_info&cPath=27&products_id=159

the old server have character encoding latin1
the new server have character encoding utf8

thanks for the help

4 Jan 2013, 5:29 PM
#2
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Re: question marks (?) on products_name and products_description

I think you've answered your own question... Isn't there a way to change the back to the old character encoding? Read this though:

http://www.zen-cart.com/content.php?313

6 Jan 2013, 6:28 PM
#4
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: question marks (?) on products_name and products_description

I looks to me like you like you copied and pasted all of your product descriptions from some external source (supplier docs perhaps), and the bullet characters that these descriptions use are the issue.. I honestly am not sure that this is a character encoding issue.. It looks like the DB conversion converted these bullet characters to question marks because they were invalid characters to begin with. Had a client who had the same issue with some of her product descriptions for the very same reason. She was also copying and pasting descriptions from her suppliers documents and these documents included characters that were being saved and displayed in odd ways.

Changing the encoding isn't going to fix this as these question marks are what's actually being stored in your database now. You will need to clean up your product descriptions.. You can do this manually or you can try running some find and replace scripts to replace the question marks with a different character.

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

6 Jan 2013, 9:26 PM
#5
rayw1679 avatar

rayw1679

Zen Follower

Join Date:
Mar 2005
Location:
Waxahachie, Texas
Posts:
172
Plugin Contributions:
0

Re: question marks (?) on products_name and products_description

I am having the same problem on the first of several stores I'm upgrading. I performed a backup using PHPMYADMIN (all defaults) and then restored with the same one to a new database on the same server. However, text fields have question marks (�) at various places. A copy and paste from the item description of the old stores shows this:

"This custom linen pillow gives your bed, couch, or chair a vintage look. This simple design adds a touch of character, while reminding your spouse of your anniversary date, a child's birth date, or any date worth remembering.

Because this is a custom order, please expect a delivery date of 2 weeks. When ordering, please include in the notes section the date you would like and the color of print. "

While the new store shows this:

"This custom linen pillow gives your bed, couch, or chair a vintage look.� This simple design adds a touch of character, while reminding your spouse of your anniversary date, a child's birth date, or any date worth remembering.�

Because this is a custom order, please expect a delivery date of 2 weeks.� When ordering, please include in the notes section the date you would like and the color of print. �"

I have sent a query to 1and1's server support, as I suspect it's a PHPADMIN problem, but have not yet received a response. The patch for "latin" is installed in the admin configure file:
define('DIR_WS_HTTPS_CATALOG', '/michellegibson.net/store151/');

define('DB_CHARSET', 'latin1');
define('DIR_WS_IMAGES', 'images/');

Thanks,
Ray

9 Jan 2013, 8:10 PM
#6
rayw1679 avatar

rayw1679

Zen Follower

Join Date:
Mar 2005
Location:
Waxahachie, Texas
Posts:
172
Plugin Contributions:
0

Re: question marks (?) on products_name and products_description

Perhaps I didn't properly understand the instructions in the link above.

On my server (1and1), apparently the default charset is latin1. I went to store/includes/languages/english.php and changed
define('CHARSET', 'utf-8');
to
// define('CHARSET', 'utf-8');

It now works fine.

Thanks,
Ray

9 Jan 2013, 8:53 PM
#7
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: question marks (?) on products_name and products_description

rayw1679:

Perhaps I didn't properly understand the instructions in the link above.

On my server (1and1), apparently the default charset is latin1. I went to store/includes/languages/english.php and changed
define('CHARSET', 'utf-8');
to
// define('CHARSET', 'utf-8');

It now works fine.

Perhaps you misunderstood or didn't read the following:

Also edit your two configure.php files to set DB_CHARSET to 'latin1' instead of 'utf8'
(add the line if it doesn't exist):
define('DB_CHARSET', 'latin1');

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

27 Jan 2013, 7:10 AM
#8
rayw1679 avatar

rayw1679

Zen Follower

Join Date:
Mar 2005
Location:
Waxahachie, Texas
Posts:
172
Plugin Contributions:
0

Re: question marks (?) on products_name and products_description

Thank you for your response. I tried both of those, and some of the characters went away, but there were many new ones. I backed up my 1.3.8 SQL 4.0 file and restored it to a 5.0 file for 1.5.1. Viewing the backups of the files with Wordpad, I could see where question marks had been inserted many times in my 5.0 data. Checking my host (1and1), I noticed that although my previous database had apparently been latin1, the restore defaulted to utf-8. I restored the 4.0 database into another 5.0 database, specifying latin1 for the restore, reran the database upgrade for 1.5.1, and the question marks disappeared.

Thanks,
Ray

31 Jan 2013, 12:50 AM
#9
rayw1679 avatar

rayw1679

Zen Follower

Join Date:
Mar 2005
Location:
Waxahachie, Texas
Posts:
172
Plugin Contributions:
0

Re: question marks (?) on products_name and products_description

Update: After commenting out the CHARSET in english.php (as per above), I discovered many of this message in the logs:
PHP Warning: htmlspecialchars() [<a href='function.htmlspecialchars'>function.htmlspecialchars</a>]: charset `CHARSET' not supported, assuming iso-8859-1 in …/store/includes/functions/functions_general.php on line 74

I uncommented and changed the CHARSET to "latin1", as per the instructions for the two configure.php files, and began receiving these messages:
PHP Warning: htmlspecialchars() [<a href='function.htmlspecialchars'>function.htmlspecialchars</a>]: charset `latin1' not supported, assuming iso-8859-1 in …/store/includes/functions/functions_general.php on line 74

I changed "latin" to "iso-8859-1" (in the english.php only, not in the configure.php files) and I'm receiving no more error messages. My text looks fine in the store.

Thanks,
Ray