Page 13 of 15 FirstFirst ... 31112131415 LastLast
Results 121 to 130 of 145
  1. #121
    Join Date
    Feb 2004
    Location
    Georgia, USA
    Posts
    1,948
    Plugin Contributions
    0

    Default Re: UTF-8 Zen-Cart Tutorial for v1.3.x

    Quote Originally Posted by DrByte View Post
    I agree -- that script was probably the closest I've seen to reliably handling most of the steps involved in properly preserving data while converting character sets and collation to UTF8.

    I've made some alterations to overcome several of the limitations I see in it, and contributed the result here:
    http://www.zen-cart.com/index.php?ma...oducts_id=1937

    Feedback welcome.
    DrByte, your instruction said
    e) Update your Zen Cart configure.php settings to use UTF8 for DB_CHARSET
    I do not see the option for this change in either the catalog or admin configure.php. Is this setting located somewhere else?

    Thanks!

  2. #122
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: UTF-8 Zen-Cart Tutorial for v1.3.x

    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.

  3. #123
    Join Date
    Feb 2004
    Location
    Georgia, USA
    Posts
    1,948
    Plugin Contributions
    0

    Default Re: UTF-8 Zen-Cart Tutorial for v1.3.x

    Quote Originally Posted by DrByte View Post
    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
    Thanks DrByte! Do I need to touch these two lines of code in english.php for both catalog or admin? Just curious.

    PHP Code:
    setlocale(LC_TIME'en_US.ISO_8859-1');
    define('CHARSET''iso-8859-1'); 

  4. #124
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: UTF-8 Zen-Cart Tutorial for v1.3.x

    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.

  5. #125
    Join Date
    Feb 2004
    Location
    Georgia, USA
    Posts
    1,948
    Plugin Contributions
    0

    Default Re: UTF-8 Zen-Cart Tutorial for v1.3.x

    Quote Originally Posted by DrByte View Post
    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:
    PHP Code:
    <?php define('DB_CHARSET''utf8');
    Update english php file in the catalog and admin to:

    change this line from
    PHP Code:
    setlocale(LC_TIME'en_US.ISO_8859-1'); 
    to
    PHP Code:
    setlocale(LC_TIME'en_US.utf8'); 
    change this line from
    PHP Code:
    define('CHARSET''iso-8859-1'); 
    to
    PHP Code:
    define('CHARSET''utf-8'); 
    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.

  6. #126
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: UTF-8 Zen-Cart Tutorial for v1.3.x

    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.

  7. #127
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: UTF-8 Zen-Cart Tutorial for v1.3.x

    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.

  8. #128
    Join Date
    Feb 2004
    Location
    Georgia, USA
    Posts
    1,948
    Plugin Contributions
    0

    Default Re: UTF-8 Zen-Cart Tutorial for v1.3.x

    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!

  9. #129
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: UTF-8 Zen-Cart Tutorial for v1.3.x

    :)
    .

    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.

  10. #130
    Join Date
    Feb 2004
    Location
    Georgia, USA
    Posts
    1,948
    Plugin Contributions
    0

    Default Re: UTF-8 Zen-Cart Tutorial for v1.3.x

    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" />

 

 
Page 13 of 15 FirstFirst ... 31112131415 LastLast

Similar Threads

  1. Desperate for help - Zen Cart / PHP 5 / UTF-8 issues
    By gingabox in forum General Questions
    Replies: 13
    Last Post: 15 Jun 2010, 05:45 AM
  2. Updated wamp + zen cart tutorial for Zen Cart 1.3.8a and Wamp Server 2.0i
    By dakos in forum Installing on a Windows Server
    Replies: 20
    Last Post: 29 Mar 2010, 01:07 AM
  3. Where to get Tutorial or Help file for Zen-Cart?
    By chungenhung in forum General Questions
    Replies: 9
    Last Post: 22 Jul 2009, 02:10 PM
  4. Zen Cart with UTF-8 database
    By thewolf in forum General Questions
    Replies: 5
    Last Post: 19 Jul 2007, 12:37 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR