Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2011
    Posts
    32
    Plugin Contributions
    0

    Default Japanese Data stored in MySQL as Latin1

    I have customer data in Japanese stored in the mysql database as Latin1. In the zen-cart admin, it shows fine.

    I am trying to import it into a new zen cart install. The site design has been applied, but it looks like they used a different zen cart version. In the customer table there are new fields like "customers_firstname_kana" and it's in eucjpms_japanese_ci . If I import the data directly using phpmyadmin import/export, it does not show up properly on the new site.

    What would be the best way to proceed? Should I switch site back to latin1 and try to use first setup which works correctly? Or import with special characters and question marks and then change table encoding in mysql? I also thought of using a plugin to try exporting directly from the zen cart admin.

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

    Default Re: Japanese Data stored in MySQL as Latin1

    First need some more information, including:
    What is the ZC version for the old site and for the new site?
    What is the CHARSET set to in the old site and in the new site?
    What is the database collation set to for the products_description field in the products table, on both the old site and the new site?
    What plugins are installed on the old site?
    What PHP version on old and new site?
    What MySQL version on old and new 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
    Jun 2011
    Posts
    32
    Plugin Contributions
    0

    Default Re: Japanese Data stored in MySQL as Latin1

    Quote Originally Posted by DrByte View Post
    First need some more information, including:
    What is the ZC version for the old site and for the new site?
    What is the CHARSET set to in the old site and in the new site?
    What is the database collation set to for the products_description field in the products table, on both the old site and the new site?
    What plugins are installed on the old site?
    What PHP version on old and new site?
    What MySQL version on old and new site?
    Old site:
    v1.5.3, recently upgraded from v1.2. New upgrade works without problems.
    New site:
    v1.5.3 clean install

    Old Site Char Set:
    In admin/includes/languages/japanese.php
    mb_language('Japanese');
    mb_internal_encoding("EUC-JP");
    mb_http_output("EUC-JP");
    MySQL zen_customers table and field collation:
    latin1_swedish_ci

    New Site Char Set:
    In admin/includes/languages/japanese.php
    mb_internal_encoding("EUC-JP");
    mb_http_output("EUC-JP");
    MySQL zen_customers table and field collation:
    eucjpms_japanese_ci

    PHP version
    5.3.27

    MySQL version both sites
    5.5.37-cll


    Please let me know if you still require list of plugins.

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

    Default Re: Japanese Data stored in MySQL as Latin1

    I can't speak to the exact steps you need to take, but I would probably advise converting all your custom fields to use the same collation as the original core ZC tables.

    Just remember that when converting between latin1 and utf8 you can't merely change the setting in the database or the individual fields without first preserving the data inside each field, else you run the risk of corrupting the contents of each record. I imagine the same problem exists when converting between eucjpms and utf8 or latin1.
    .

    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.

 

 

Similar Threads

  1. Replies: 0
    Last Post: 7 Jul 2016, 08:20 PM
  2. v151 Order Status Data Stored Where?
    By Peace Freak in forum Upgrading to 1.5.x
    Replies: 2
    Last Post: 9 May 2013, 01:00 AM
  3. Change data stored in orders table
    By dev.stefan in forum General Questions
    Replies: 1
    Last Post: 4 Aug 2008, 08:25 AM
  4. Can't access my data MySql data base
    By Roon in forum Installing on a Linux/Unix Server
    Replies: 23
    Last Post: 6 Sep 2007, 03:26 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