Results 1 to 10 of 10
  1. #1
    Join Date
    Mar 2009
    Location
    New York
    Posts
    157
    Plugin Contributions
    0

    Default Changing to UTF-8 in existing cart?

    I have a bookstore with a few non-English titles. These titles display correctly in zen cart but when a customer orders them the order email has gibberish for non-English titles. A thread in the forum has a tutorial on how to change the encoding to UTF-8 from ISO_8859-1 to solve such problems. Can it be done without a new install of zen cart. It would save a lot of work if the changes can be done in the existing install. Any help? Suggestion? Thanks in advance.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Changing to UTF-8 in existing cart?

    In phpMyAdmin when you look at the structure of the products_name field in your products_description table, what collation is it set to?
    Similarly, what is the collation of the customers_lastname field in your customers table?
    In your english.php files, what is CHARSET defined to? What is CHARSET set to in any other languages you've got on your site?
    What version of PHP?
    What version of MySQL?


    What is your usual backup procedure for your site?
    .

    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. #3
    Join Date
    Mar 2009
    Location
    New York
    Posts
    157
    Plugin Contributions
    0

    Default Re: Changing to UTF-8 in existing cart?

    Our website keeps back up for 7 days. I downloaded the mysql database and the files. I went ahead and successfully changed the zen cart encoding to utf-8. The gibbersish in the email for non English characters is still there. I will find answer to the questions raised by you and get back to you.

  4. #4
    Join Date
    Nov 2003
    Posts
    1,987
    Plugin Contributions
    15

    Default Re: Changing to UTF-8 in existing cart?

    I would be careful because translations from English to Gibberish, and even Klingon, are easy. But translation back from Klingon to English might be problematic...
    (but I must admit am still an encoding noob..)

  5. #5
    Join Date
    Mar 2009
    Location
    New York
    Posts
    157
    Plugin Contributions
    0

    Default Re: Changing to UTF-8 in existing cart?

    DrByte Some of the questions raised by you opened my eyes to a host of incompatibility issues. Here is what I found.
    In phpMyadmin when I looked at the structure of the produts_name filed, the collation was set to latin1_swedish_ci. I changed it to uft-8. Same with customers_lastname and I changed it to uft8_general_ci. In english.php I changed the CHARSET to uft8. No other language pack has been used by me in zen cart. php version was 4!!! But I could change it to 5The full version is 5.2.17. mysql is version 5.0.

  6. #6
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Changing to UTF-8 in existing cart?

    I was asking questions, not giving instructions. I hope you keep copies of your backups. You may have damaged your database.

    You should *never* change the collation settings directly, lest you lose characters aren't translated properly using that approach. There's a conversion script for changing the database collation/charset safely.
    And in your English.php files charset should go to utf-8 not utf8.

    What version of Zen Cart are you using?
    .

    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. #7
    Join Date
    Mar 2009
    Location
    New York
    Posts
    157
    Plugin Contributions
    0

    Default Re: Changing to UTF-8 in existing cart?

    English.php file charset is utf-8 and was never utf8. I am using
    Zen Cart 1.3.9f
    Patch: 1::
    Database Patch Level: 1.3.9a

    Thanks for the warning. Is there any way to check if the database is damaged. Outwardly it looks OK.

  8. #8
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Changing to UTF-8 in existing cart?

    Quote Originally Posted by Arunachala View Post
    I am using
    Zen Cart 1.3.9f
    Patch: 1::
    Database Patch Level: 1.3.9a
    You should really be upgrading to v1.3.9h ... it's generally just a matter of updating a few files.

    Quote Originally Posted by Arunachala View Post
    Is there any way to check if the database is damaged. Outwardly it looks OK.
    only by looking at products/categories/customer names/addresses, etc which have non-english characters in them that are dependent on utf8 for proper display. If you get funny symbols like square boxes or reverse-hearts etc showing in place of cyrillic symbols, for example, then that's an indicator that you've damaged the data.

    Quote Originally Posted by Arunachala View Post
    In phpMyadmin when I looked at the structure of the produts_name filed, the collation was set to latin1_swedish_ci.
    If that's what you found *after* running the conversion script you said you ran earlier, then ... your script did NOT actually do the job it should have done.
    Quote Originally Posted by Arunachala View Post
    I changed it to uft-8. Same with customers_lastname and I changed it to uft8_general_ci.
    You should really be letting the script do that, and not doing it by hand, since doing it by hand will typically *lose* the special utf8-specific characters.

    Quote Originally Posted by Arunachala View Post
    php version was 4!!! But I could change it to 5The full version is 5.2.17.
    Quote Originally Posted by Arunachala View Post
    I am using
    Zen Cart 1.3.9f
    You should be fine with PHP 5.2.17, and indeed that would be a better choice than PHP4. If you're running any other software on your website or any old addons that require PHP4, then you might need to upgrade those first before upgrading your PHP version. But ZC v1.3.9 is fine with PHP 5.2.3 and higher.
    .

    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.

  9. #9
    Join Date
    Mar 2009
    Location
    New York
    Posts
    157
    Plugin Contributions
    0

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

    DrByte I did most of the changes for collation based on the advice given below. Evidently those who have used it are OK with it.

    Quote Originally Posted by CrystalKoi View Post
    I posted a tutorial as to how to transition

    zen-cart over to UTF-8 encoding also having the database encoded in UTF-8 too. This was made for carts using Japanese, but it could be used for many other languages.

    Here is the link
    UTF-8 Zen-Cart

    I hope people find this helpful.

    Regards,

    CKD
    I also found this add on UTF-8 Support for Zencart. It says changing on to UTF-8 on an existing cart is hard work and not for the faint-hearted . Has anybody used this add-on for fresh install.

  10. #10
    Join Date
    Mar 2009
    Location
    New York
    Posts
    157
    Plugin Contributions
    0

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

    I have solved my problem by using English transliteration for non-English titles. This works fine.

    Thanks for your advice.

 

 

Similar Threads

  1. Question about changing database to Utf-8
    By kcb410 in forum General Questions
    Replies: 7
    Last Post: 6 Dec 2012, 03:46 PM
  2. v139g changing the encoding to utf-8
    By smokers-heaven in forum Basic Configuration
    Replies: 3
    Last Post: 18 Aug 2012, 10:24 AM
  3. UTF-8 Zen-Cart Tutorial for v1.3.x
    By CrystalKoi in forum Addon Language Packs
    Replies: 144
    Last Post: 17 Jan 2012, 02:15 PM
  4. How do I upgrade an existing site to UTF-8
    By totalsam in forum Addon Language Packs
    Replies: 1
    Last Post: 14 Aug 2011, 02:17 AM
  5. Zen Cart with UTF-8 database
    By thewolf in forum General Questions
    Replies: 5
    Last Post: 19 Jul 2007, 12:37 PM

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