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
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
Hmmm ... ya, probably a good idea. :)
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
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?
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
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'
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
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!
:)
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
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" />
Bookmarks