Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 36
  1. #11
    Join Date
    Nov 2006
    Posts
    296
    Plugin Contributions
    2

    Default Re: ability to define DB_CHARSET ?

    Quote Originally Posted by DrByte View Post
    You need to say 'latin1' instead of 'utf8'
    Ok, i have trouble understanding the logic, but don't have the time to be bothered right now...
    It is working and extremely happy with that, thank you!

  2. #12
    Join Date
    Jul 2010
    Posts
    11
    Plugin Contributions
    0

    Default Re: ability to define DB_CHARSET ?

    DrByte, I have the following problem: I have followed the steps to install a new, fresh ZenCart to be utf8 from the start, as described here: srw2d.com/sites/default/files/utf-8-zen-cartV1.3.8.pdf

    I also noted the point that for ZC 1.3.9d WHich I am using, you should not modify the query_factory.php but instead create two new files called my_db_charset.php and put them in /yoursite/includes/extra_configures/ and /yoursite/admin/includes/extra_configures/ respectively.

    Now: Having done all that and followed through with a new, clean installation without any problems, the result is this: Whether I try to open the front or the administrator back end, I just got the install page all over again, as if nothing had happened. When I remove those two files called my_db_charset.php the front end and back end show up just fine!

    What is wrong here?

    Now it seems to work fine, but I am afraid that when I next install a spanish language pack and start entering data in both english and spanish that things will get messy....

    Thanks very much in advance for an answer.

  3. #13
    Join Date
    Jul 2010
    Posts
    11
    Plugin Contributions
    0

    Default Re: ability to define DB_CHARSET ?

    Oh, and by the way: Obviously this alternative way of setting the db_charset in a separate file instead of modufying the query_factory.php obviously didn't work at all in my case: After giving the new and fresh database a look I found that all the tables had still been created with latin1 collation!

    Now I have manually and painstakingly changed the charset of every field (where specified) in every table, plus the collation of every table to utf8_general_ci. Phuhh.... That's a lot of mouse clicks... I once came across a post that showed a way to do this with SQL scripts, but where was it when I needed it?

    Anyways: I would still like to know what to do here, because even though I should be fine now, every time in the future that I add something that creates another database table, obviously I need to manually change this. Please, someone help??

  4. #14
    Join Date
    Jan 2004
    Posts
    64,747
    Blog Entries
    6
    Plugin Contributions
    214

    Default Re: ability to define DB_CHARSET ?

    If the system is completely ignoring the built-in code which properly sets the collation, then it's probably inheriting the collation from the database itself. Thus, changing the database's default collation and character set would be your required next step.
    .

    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.

  5. #15
    Join Date
    Jul 2010
    Posts
    4
    Plugin Contributions
    0

    Default Re: ability to define DB_CHARSET ?

    Quote Originally Posted by DrByte View Post
    Create a new file for it:

    /includes/extra_configures/my_db_charset.php
    Code:
    <?php define('DB_CHARSET', 'your_charset_here');
    Do the same with: /admin/includes/extra_configures/my_db_charset.php


    NOTES:
    - This is only applicable to v1.3.9x. It will NOT work in older versions, and is not applicable to the future version v2.x since it will be utf8 already.
    Hi all,

    this worked perfectly for German with utf8 and the '?>' at the end of the php file.

    Many thanks to all

    Regards,

    Jack

  6. #16
    Join Date
    Jan 2004
    Posts
    64,747
    Blog Entries
    6
    Plugin Contributions
    214

    Default Re: ability to define DB_CHARSET ?

    Quote Originally Posted by tweedle View Post
    and the '?>' at the end of the php file.
    Jack, that '?>' is not necessary: http://tutorials.zen-cart.com/index.php?article=313
    .

    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. #17
    Join Date
    Jun 2009
    Posts
    11
    Plugin Contributions
    0

    Default Re: ability to define DB_CHARSET ?

    Hi all. I have been successfully using Zen Cart for 2 years now....Me and my wife work at it full time, doing an online bicycle shop.

    Anyway, I am about to build a separate shop and am trying to get the UTF-8 settings sorted.

    I have 1.3.9 and so do not need to modify query_factory.php

    I just can not understand what I am meant to do instead.... sorry for being so ignorant. I just find the instructions on this thread too brief/vague to get my head around.

    ----
    Here are my questions regarding DRBYTES post/instructions....

    ----
    DrByte said//

    Create a new file for it: (((I do this by making a new file in smultron or text editor?)))

    /includes/extra_configures/my_db_charset.php
    Code:

    <?php define('DB_CHARSET', 'your_charset_here'); (((so I type UTF-8 in this space between the apostrophes?)))

    Do the same with: /admin/includes/extra_configures/my_db_charset.php

    ------
    I hope that makes sense.....

  8. #18
    Join Date
    Nov 2010
    Posts
    1
    Plugin Contributions
    0

    Default Re: ability to define DB_CHARSET ?

    Thanks DrByte! This was great help to us in fixing the correct display of our German language files.

  9. #19
    Join Date
    Aug 2004
    Location
    Osaka Japan
    Posts
    163
    Plugin Contributions
    0

    Default Re: ability to define DB_CHARSET ?

    Quote Originally Posted by DrByte View Post
    Create a new file for it:

    /includes/extra_configures/my_db_charset.php
    Code:
    <?php define('DB_CHARSET', 'your_charset_here');
    Do the same with: /admin/includes/extra_configures/my_db_charset.php


    NOTES:
    - This is only applicable to v1.3.9x. It will NOT work in older versions, and is not applicable to the future version v2.x since it will be utf8 already.
    Created and uploaded as outlined, the result is a DB collation of latin1_general_ci in the tables, I am now manually changing each field. Adding the 2 files causes the store and admin screen to go blank. I'm not clear why I had this problem.

  10. #20
    Join Date
    Aug 2004
    Location
    Osaka Japan
    Posts
    163
    Plugin Contributions
    0

    Default Re: ability to define DB_CHARSET ?

    I found the reason for blank store and admin pages in my case was a simple mixup of admin and store english.php files. Putting the correct files in place corrected the problem.

 

 
Page 2 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. v154 CHARSET / DB_CHARSET: Valid combinations?
    By lat9 in forum General Questions
    Replies: 2
    Last Post: 5 Feb 2016, 02:43 PM
  2. Diamond characters and I tried defining DB_CHARSET
    By lruskauff in forum Upgrading to 1.5.x
    Replies: 2
    Last Post: 14 Jan 2014, 06:23 AM
  3. Define Pages - How to define brand new page
    By hutch32804 in forum Customization from the Admin
    Replies: 4
    Last Post: 31 Oct 2009, 01:39 PM
  4. Uploading Ability?
    By wildkeith in forum General Questions
    Replies: 2
    Last Post: 22 Nov 2008, 04:59 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