Page 4 of 15 FirstFirst ... 2345614 ... LastLast
Results 31 to 40 of 145
  1. #31
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,585
    Plugin Contributions
    30

    Default Re: UTF-8 Zen-Cart Tutorial

    Hi,
    Some notes about my experience with this.
    I am rebuilding a site that developed a (non-encoding-related) problem I could not solve so I started again and since I have an english-spanish site it seemed a good idea to go UTF-8 from this new start.

    I followed the tutorial and all seemed to work ok.
    Now I am gradually adding in the template mods I did previously.
    (I’m using Notepad++ which shows the encoding of the file and can convert between different encodings and UTF-8, it reports the file encoding on the bottom right of the status bar.)

    1) Adding spanish language files (from an old contribution which I have updated to 1.38a).
    Firstly I found that any accented character was wrongly reproduced in the shop.
    Notepad++ reported the relevant language file as being ANSI encoded.
    I converted this to UTF-8, the accented characters in the file changed to unrecognised characters which once corrected displayed correctly in the shop.

    2) Next I started getting blank screens on certain places in the shop.
    I found that this was due to now having the spanish.php (or english.php) encoded as “UTF-8” instead of “UTF-8 without BOM”.
    Things seem ok now.

    So, I don’t know whether I now have to convert every file in the shop whether pure php or only the language files to have things as they ”should be”?

    Regards
    Steve

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

    Default Re: UTF-8 Zen-Cart Tutorial

    Language files: all should be UTF-8 without BOM.

    Template files and other PHP files: any file that contains special characters should also be converted to UTF-8 without BOM. However, if you've used language constants properly, you should never need to touch any other files.

    SQL files: the files in the zc_install folder are only used during installation or upgrade. As such, if your site is already installed, there's no need to convert them.
    .

    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. #33
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,585
    Plugin Contributions
    30

    Default Re: UTF-8 Zen-Cart Tutorial

    Thanks for that confirmation,
    I just found it strange that no-one else had mentioned similar symptoms regarding the encoding of language files.

    In practice Notepad++ does not "convert" a file from ANSI to UTF-8 if there are no accented chars in the file (such as in a pure php file): on reopening the file it is reported as being still ANSI.

    Anyway everything seems to be working UTF-fine now so full marks to CrystalKoi,

    regards
    Steve

  4. #34
    Join Date
    Aug 2005
    Location
    NJ, USA
    Posts
    35
    Plugin Contributions
    0

    Default Re: UTF-8 Zen-Cart Tutorial

    Dear Friends,
    Many thanks for this thread and the information converting the site to UTF-8.

    I have done everything as written and it works fine on both the web site and Admin side. Language is Hebrew on GoDaddy shared hosting with MySql 5.

    The issue we having is when we insert information from the website/admin we have everythig ok on the web/admin side but on the MySql PHP Admin we get unreadable characters.
    If we key information in the MySql PHP Admin we get unreadable characters on the site/admin.
    Here is sample of characters we get on the MySql PHP Admin:
    'מרכזיות'
    The MySql is set to
    Code:
     COLLATE utf8_general_ci
    Site is www.addvant.co.il
    Thanks
    AddVant
    Last edited by AddVant; 2 Dec 2008 at 08:43 AM.
    VoIP and get more when you communicate www.addvant.com

  5. #35
    Join Date
    Apr 2007
    Posts
    182
    Plugin Contributions
    0

    Default Re: UTF-8 Zen-Cart Tutorial

    @AddVant

    1st, you did the database Collation before you installed Zen-Cart?

    Also, you did this too?:


    The next change is to query_factory.php.


    NOTE:
    With v1.3.9 you don't have to touch the query_factory.php file.

    You should use this method instead:
    http://www.zen-cart.com/forum/showthread.php?t=153582

    For v1.3.8 and OLDER, use the following:

    Find it in: includes/classes/db/mysql/query_factory.php

    1-> Find this (line 33):
    PHP Code:
     // pconnect disabled ... leaving it as "connect" here instead of "pconnect"
          
    $this->link = @mysql_connect($zf_host$zf_user$zf_passwordtrue);
        }
        if (
    $this->link) {
          if (@
    mysql_select_db($zf_database$this->link)) {
            
    $this->db_connected true;
            return 
    true;
          } else {
            
    $this->set_error(mysql_errno(),mysql_error(), $zp_real);
            return 
    false;
          }
        } else {
          
    $this->set_error(mysql_errno(),mysql_error(), $zp_real);
          return 
    false;
        }
      } 
    2-> Change to this (this will not work as an override):

    PHP Code:
        // pconnect disabled ... leaving it as "connect" here instead of "pconnect"
          
    $this->link = @mysql_connect($zf_host$zf_user$zf_passwordtrue);
        }
        if (
    $this->link) {
          if (@
    mysql_select_db($zf_database$this->link)) {

              
    //BOF changed for utf-8
              
    mysql_query('SET NAMES "utf8"'$this->link);
              
    //EOF changed for utf-8
          
            
    $this->db_connected true;
            return 
    true;
          } else {
            
    $this->set_error(mysql_errno(),mysql_error(), $zp_real);
            return 
    false;
          }
        } else {
          
    $this->set_error(mysql_errno(),mysql_error(), $zp_real);
          return 
    false;
        }
      } 

  6. #36
    Join Date
    Oct 2006
    Location
    Italy
    Posts
    634
    Plugin Contributions
    0

    Default Re: UTF-8 Zen-Cart Tutorial

    I would change all my zencart to UTF-8, for full compatibility with all browser. But I've to change into UTF-8 all my db tables?

  7. #37
    Join Date
    Apr 2007
    Posts
    182
    Plugin Contributions
    0

    Default Re: UTF-8 Zen-Cart Tutorial

    Before you install Zen-Cart you need to change the database Collation. That should take care of the database.

  8. #38
    Join Date
    Oct 2006
    Location
    Italy
    Posts
    634
    Plugin Contributions
    0

    Default Re: UTF-8 Zen-Cart Tutorial

    I've already zencart 1.3.7 installed, and the collation into db is already set to utf-8

  9. #39
    Join Date
    May 2009
    Posts
    6
    Plugin Contributions
    0

    Default Re: UTF-8 Zen-Cart Tutorial

    HI,'

    There is an add-on for UTF-8 fro Zen Cart 1.3.8a

    UTF-8 Support for ZenCart 1.3.8a
    Author: Markos Kyriacou

    I am in process of installing a fresh Zen Cart 1.3.8a. After reading through the posts in this thread, I am still a little confused.

    1. Should I install a fresh copy of Zen Cart 1.3.8a and after that install the UTF-8 add-on?

    2. Should I follow the instructions of this thread and Configure the database first and follow the steps as recommended in www.srw2d.com/content/utf-8-zen-cart? Do I still need to install the UTF-8 add-on?

    Please advise for Zen Cart newbie!

    Thank You!!!!


  10. #40
    Join Date
    Apr 2007
    Posts
    182
    Plugin Contributions
    0

    Default Re: UTF-8 Zen-Cart Tutorial

    They should both work, I kind of like the one on srw2d.com

 

 
Page 4 of 15 FirstFirst ... 2345614 ... 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