Thread: Using UTF-8

Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2007
    Posts
    29
    Plugin Contributions
    0

    Default Using UTF-8

    Hello, I would like to use the latest version of Zen Cart but would also like my cart to be fully UTF-8 compatible. I found the UTF-8 Add-On but it is for version 1.3.7. Can anyone advise me what would be involved in changing this to work with 1.3.8a?

    Would this work:

    1. In /includes/languages/ and /admin/includes/languages english.php -

    CHANGE:
    define('CHARSET', 'iso-8859-1');
    TO:
    define('CHARSET', 'utf-8');

    2. In /includes/classes/db/mysql/query_factory.php change the code by adding two lines 38-39:

    FROM:
    Code:
    if ($this->link) {
      if (@mysql_select_db($zf_database, $this->link)) {
         $this->db_connected = true;
         return true;
    TO:
    Code:
    if ($this->link) {
      if (@mysql_select_db($zf_database, $this->link)) {
          if (version_compare(mysql_get_server_info(), '4.1.0', '>=')) {
           mysql_query('SET NAMES "utf8"', $this->link);}
        $this->db_connected = true;
        return true;
    3. Open up mysql_zencart.sql in \zc_install\sql and change the MyIAAM references:

    from: TYPE=MyISAM;
    to: TYPE=MyISAM DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

    Is there anything else that needs to be done? I realise I could try but I'm asking for some feedback before spending the time uploading all the files. I'd rather know in advance if this has no chance of working.

    Thanks,

    AQ

  2. #2
    Join Date
    Jun 2007
    Location
    37°N
    Posts
    3
    Plugin Contributions
    0

    Default Re: Using UTF-8

    I have mixed answers to your inquiry :

    As per the first point, yes that's correct (but then again, unless you have other accentuated languages or unicode languages installed, you don't need to change the English file)

    As per point 2, you need to do that only with fresh install

    As per your last point, yes but somehow tables inside do not get changed unless you do them one by one.

    I suggest you do a fresh install, start with creating you SQL database first and make sure that the collation is utf8-unicode. Then change the language file as you suggested in point 1. Then upload and install.

    One last important point, make sure that all your files (for additional languages are encoded in UTF-8 not Ansi (if you are using Windows).

    I hope that helps
    Good luck!

 

 

Similar Threads

  1. UTF 8 Conversion
    By Nick1973 in forum General Questions
    Replies: 3
    Last Post: 21 Nov 2011, 08:54 PM
  2. my language is Spanish -- should I install ZenCart using 8859-1 or UTF-8?
    By JuanLuis in forum Installing on a Windows Server
    Replies: 0
    Last Post: 12 Apr 2011, 08:12 AM
  3. Utf-8
    By damiantaylor in forum General Questions
    Replies: 0
    Last Post: 30 Nov 2010, 07:07 PM
  4. UTF-8 Problem
    By mireka in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 10 Jun 2006, 12:59 AM

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