DrByte, your instruction saidI do not see the option for this change in either the catalog or admin configure.php. Is this setting located somewhere else?Quote:
e) Update your Zen Cart configure.php settings to use UTF8 for DB_CHARSET
Thanks!
Printable View
Post 92, earlier in this thread, has a link to how to handle this in 1.3.9: http://www.zen-cart.com/forum/showthread.php?t=153582
Hmmm ... ya, probably a good idea. :)
Okay, this is getting more complicated than I thought. There are actually 8 files or so in Zen Cart that reference iso-8859-1 and I am not sure of only english.php files needs the changes or if I have to touch more files.
When you get a chance to give this some thought it will probably be a good idea to provide more information on the best way to approach this.
Originally, this was going to be my plan of attack.
1. run your script
2. create /includes/extra_configures/my_db_charset.php and /adminFOLDER/includes/extra_configures/my_db_charset.php
3 Add this code to the above two files:
Update english php file in the catalog and admin to:PHP Code:
<?php define('DB_CHARSET', 'utf8');
change this line fromtoPHP Code:
setlocale(LC_TIME, 'en_US.ISO_8859-1');
change this line fromPHP Code:
setlocale(LC_TIME, 'en_US.utf8');
toPHP Code:
define('CHARSET', 'iso-8859-1');
Also, I am not sure what the difference between utf8 and utf-8 is just simply follow the instruction provided. A clarification between the two if any will help as well.PHP Code:
define('CHARSET', 'utf-8');
Keep in mind that the script itself is only intended to deal with the *database* conversion.
You *are* doing this on a TEST site, right?
If you're going to edit any language files, you need to be sure to save them encoded as UTF8-without-BOM. Otherwise you'll have a BOM header at the top of each file, which will cause you headaches with blank pages and Headers Already Sent errors.
DB_CHARSET would be 'utf8'
CHARSET in the language files would be 'UTF-8'
and LC_TIME would be 'en_US.utf8'
The script worked flawlessly without any errors and it was done applied in production but I had like 4 different backup of the database.
Thanks and I am glad I didn't destroyed our site in the process of converting the DB to utf8. That was a very nifty script!
:clap: :)
Just so I am perfectly clear, there's absolutely no reason to touch any of these files even after the database has been converted to utf-8?
CATALOG/nddbc.html
Line #4 : <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
ADMINFOLDER/alert_page.php
Line #22 : <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
includes/classes/class.phpmailer.php
Line #43 : var $CharSet = "iso-8859-1";
/includes/functions/functions_email.php
Line #171 : $mail->CharSet = (defined('CHARSET')) ? CHARSET : "iso-8859-1";
/includes/functions/functions_general.php
Line #1582 : if (function_exists('iconv')) $string = iconv("Windows-1252", "ISO-8859-1//IGNORE", $string);
/includes/templates/template_default/templates/tpl_zc_install_suggested_default.php
Line #19 : <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />