Results 1 to 7 of 7
  1. #1
    Join Date
    Jun 2008
    Posts
    627
    Plugin Contributions
    0

    Default MySQL charset converter question

    I've change a database from latin1 to utf8 using DrByte's contribution.

    http://www.zen-cart.com/index.php?ma...oducts_id=1937

    The next step was to modify the configure files and english.php files.

    My question:

    the readme says

    language files (english.php, etc) need define('CHARSET', 'utf-8'); and define('LC_TIME', 'en_US.utf8'); (for english)

    I also noticed this section in the includes/languages/english.php file on line 22


    @setlocale(LC_TIME, 'en_US.ISO_8859-1');

    should that be changed to

    @setlocale(LC_TIME, 'en_US.utf8');

  2. #2
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: MySQL charset converter question

    Yes, change all iso-8859-1 to the appropriate utf8 equivalent

    ALERT: BE *SURE* TO TEST ON A *COPY* OF YOUR SITE FIRST BEFORE APPLYING THE CHANGES TO YOUR LIVE DATABASE AND PHP FILES!!!!!!!!!!
    .

    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 2008
    Posts
    627
    Plugin Contributions
    0

    Default Re: MySQL charset converter question

    thank you :-)

  4. #4
    Join Date
    Jun 2008
    Posts
    627
    Plugin Contributions
    0

    Default Re: MySQL charset converter question

    All seemed fine until I noticed some product descriptions had been truncated, some having just one character to the description.

    I have rolled back to the backup taken prior converting to utf8, so
    product descriptions are restored.

    Any idea what might cause that to happen to the product descriptions?

  5. #5
    Join Date
    Sep 2004
    Location
    London. UK.
    Posts
    164
    Plugin Contributions
    0

    Default Re: MySQL charset converter question

    Hey All

    If I ran the converter converting Latin1 to UTF8 and did not need it, how can I convert the data back ? Just in case...

    Out of interest, what is the actual Charcode and coallition I should be using for UK ?


    Thanks in advance
    Chris
    Regards,

    Chris (CCN1)

  6. #6
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: MySQL charset converter question

    If you decide you don't need it, then don't do it.
    To go back, the easiest way is to restore from backup.

    As for character-set or collation for "UK", whether you're "UK" or anywhere else is largely irrelevant. What's relevant is whether you need to store data from extended characters in your database. And even then, it may not be necessary to use other than latin1 depending on various factors such as whether you choose to complicate things by using PHP files that are encoded differently than the database. If you're not running into problems, then best to not change anything.
    .

    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
    Sep 2004
    Location
    London. UK.
    Posts
    164
    Plugin Contributions
    0

    Default Re: MySQL charset converter question

    Quote Originally Posted by DrByte View Post
    If you decide you don't need it, then don't do it.
    To go back, the easiest way is to restore from backup.

    As for character-set or collation for "UK", whether you're "UK" or anywhere else is largely irrelevant. What's relevant is whether you need to store data from extended characters in your database. And even then, it may not be necessary to use other than latin1 depending on various factors such as whether you choose to complicate things by using PHP files that are encoded differently than the database. If you're not running into problems, then best to not change anything.

    Thanks DrByte

    Slightly different now, What if I have ????? - DOH

    Can I revert easily ??

    {Think I was initially told some wrong info elsewhere}

    Cheers
    Chris
    Regards,

    Chris (CCN1)

 

 

Similar Threads

  1. v139h MySQL charset converter
    By gilby in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 21 Sep 2013, 12:55 PM
  2. v151 functions_email.php Charset CHARSET : "iso-8859-1" or UFT-8
    By Peace Freak in forum Upgrading to 1.5.x
    Replies: 2
    Last Post: 12 May 2013, 02:02 AM
  3. v139h question about charset conversion
    By swguy in forum Upgrading to 1.5.x
    Replies: 2
    Last Post: 27 May 2012, 10:21 PM
  4. MySQL charset converter
    By Soniccc in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 11 Jun 2011, 10:55 PM
  5. find/replace (sub)strings in zen's mysql-DB (mysql syntax question)
    By mypashop in forum Upgrading from 1.3.x to 1.3.9
    Replies: 2
    Last Post: 19 Oct 2007, 02:21 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