Forums / Upgrading from 1.3.x to 1.3.9 / ability to define DB_CHARSET in v1.3.9?

ability to define DB_CHARSET in v1.3.9?

Views: 46,694

Results 21 to 36 of 36
28 Mar 2011, 3:25 PM
#21
power35 avatar

power35

New Zenner

Join Date:
Mar 2011
Posts:
3
Plugin Contributions:
0

ability to define DB_CHARSET in v1.3.9?

i use version 1.3.9.. i added my_db_charset.php in admin/includes/extra configures/ and another location

after , in admin panel i used save or update button opening blank page..

please help me!

thanks..

28 Mar 2011, 10:16 PM
#22
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: ability to define DB_CHARSET in v1.3.9?

.
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.

2 Apr 2011, 7:56 AM
#23
cjcraven avatar

cjcraven

Zen Follower

Join Date:
Aug 2004
Location:
Osaka Japan
Posts:
149
Plugin Contributions:
0

Re: ability to define DB_CHARSET in v1.3.9?

power35:

i use version 1.3.9.. i added my_db_charset.php in admin/includes/extra configures/ and another location

after , in admin panel i used save or update button opening blank page..

please help me!

thanks..

I had simular problem where adding my_db_charset.php to both admin and store /includes/extra_configures/ folders resulted in blank pages. The error was making the statement <?php two times in the file (listed below) a simple editing error.

<?php /** * File defines the charcter set of the database * Put in store/includes/extra-configures/my_db_charset.php and * admin/indludes/extra-configures/my_db_charset.php * * @copyright Copyright 2003-2007 Zen Cart Development Team * @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0 */ /** */ <?php define('DB_CHARSET', 'utf8'); ?>
30 Apr 2011, 7:34 PM
#24
pizza392 avatar

pizza392

New Zenner

Join Date:
Mar 2011
Posts:
76
Plugin Contributions:
0

Re: ability to define DB_CHARSET in v1.3.9?

DrByte:

Create a new file for it:

/includes/extra_configures/my_db_charset.php

<?php define('DB_CHARSET', 'your_charset_here'); ``` > Do the same with: /**admin/**includes/extra_configures/my_db_charset.php when should i add this file to extra_configures folder? all tables have been installed in database, the collation is latin1_general_ci, is it too late to add this file? cause the database tables remain latin1_general_ci perhaps i should change all ENGINE=MyISAM to ENGINE=MyISAM DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci before i install the cart ? what do i change all latin1_general_ci to utf8_general_ci now ?
30 Apr 2011, 8:23 PM
#25
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: ability to define DB_CHARSET in v1.3.9?

Don't go mucking with existing database content. You can't just randomly change charsets on a whim. To do that requires careful alteration of all your existing data, and is an advanced operation you shouldn't be attempting without advanced knowledge of the topic.

.
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 Jan 2012, 10:44 PM
#26
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: ability to define DB_CHARSET in v1.3.9?

Wanna thank everyone for this very helpful post. Between this post, the Numinix instructions (which appears to be a basic summary of the information in this thread), and and Dr Byte's cool tool, I got this done in fairly short order.. Of course the store I converted is a dev store with minimal data in it..:smile:

Anyway.. it went smooth as a baby's bottom.. Thanks to all for the information..

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

3 Jan 2012, 11:05 PM
#27
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: ability to define DB_CHARSET in v1.3.9?

The numinix instructions are not fully accurate. And they have you touching files that don't need touching (such as the phpmailer file, etc). Use with caution.

AND in v1.5.0+ the change is simplified: just update configure.php

.
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.

4 Jan 2012, 6:28 AM
#28
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: ability to define DB_CHARSET in v1.3.9?

DrByte:

The numinix instructions are not fully accurate. And they have you touching files that don't need touching (such as the phpmailer file, etc). Use with caution.
Understood sir.. I used what was useful from all sources taking heed to your other warnings about the Numinix article..:smile:

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

10 Jan 2012, 1:20 PM
#29
dmagic avatar

dmagic

Totally Zenned

Join Date:
Oct 2008
Posts:
594
Plugin Contributions:
0

Re: ability to define DB_CHARSET in v1.3.9?

After update to "utf8"
and upload the 2 files

/admin/includes/extra_configures/my_db_charset.php
includes/extra_configures/my_db_charset.php

my home page text big font size - 3

All ez pages also 3 size text .

How can fixed all is 2 size ?

Thanks

21 Feb 2012, 1:45 AM
#30
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: ability to define DB_CHARSET in v1.3.9?

DrByte:

AND in v1.5.0+ the change is simplified: just update configure.php
Just caught this.. are my eyes deceiving me?? In v1.5 I ONLY need to update the configure.php file??? What if I am upgrading?? do I make this change in the configure before doing the upgrade via the install script??

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

21 Feb 2012, 1:51 AM
#31
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: ability to define DB_CHARSET in v1.3.9?

.
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.

21 Feb 2012, 1:59 AM
#32
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: ability to define DB_CHARSET in v1.3.9?

DrByte:

https://www.zen-cart.com/tutorials/index.php?article=414

Okay based on this part:

edit your upgraded english.php file to use the old CHARSET and setlocale settings, as well as edit your configure.php file to set DB_CHARSET to 'latin1'if I DON'T need to convert, then I need to change edit the configure.php file and the english.php file BACK to the old characterset.. Am I understanding this correctly???

(if I am I have a followup question)
IF I need to convert, does the upgrade process upgrade the data and tables, or do I still need to run your conversion script??? (the one that's in the free downloads section)

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

21 Feb 2012, 2:11 AM
#33
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: ability to define DB_CHARSET in v1.3.9?

Choosing your character set is your job, not Zen Cart's job. The zc_install upgrade process DOES NOT change your character set. That's up to you.

If your existing database is NOT in utf-8 then you'll need to change your Zen Cart language files and configure.php to use whatever character set you're using with your database.

For new installs, it's best to use utf-8 because it's generally more globally compatible and most hosts use it by default now, so a new store should also use it by default. That's why the Zen Cart distribution files are set to use utf-8 by default.
Again, if you can't or don't want to use utf8 for whatever reason (including because you're upgrading a store whose data is NOT already utf8) then you need to change the Zen Cart code/files/etc to NOT use utf8.

.
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.

21 Feb 2012, 6:56 AM
#34
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: ability to define DB_CHARSET in v1.3.9?

DrByte:

Choosing your character set is your job, not Zen Cart's job. The zc_install upgrade process DOES NOT change your character set. That's up to you.okay.. got it... I will run the database upgrade script I used before..

DrByte:

If your existing database is NOT in utf-8 then you'll need to change your Zen Cart language files and configure.php to use whatever character set you're using with your database.understood..:yes:

DrByte:

For new installs, it's best to use utf-8 because it's generally more globally compatible and most hosts use it by default now, so a new store should also use it by default. That's why the Zen Cart distribution files are set to use utf-8 by default.
Again, if you can't or don't want to use utf8 for whatever reason (including because you're upgrading a store whose data is NOT already utf8) then you need to change the Zen Cart code/files/etc to NOT use utf8.understood..:yes:

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

27 Mar 2013, 2:59 PM
#35
ttenzan avatar

ttenzan

New Zenner

Join Date:
Aug 2012
Posts:
3
Plugin Contributions:
0

Re: ability to define DB_CHARSET in v1.3.9?

Hello,

I have a problem with my Zencart 1.3.9h. I installed Zencart with UTF8 coding. The same with some people here, my Zencart could display Japanese characters correctly but in the MySQL DB, the characters show a mess. After I installed the following files, MySQL DB and Zencart shop both can display Japanese Characters correctly.

/includes/extra_configures/my_db_charset.php
/admin/includes/extra_configures/my_db_charset.php

However, a new issue happens. When I want to create a new account from shop page or input product information from admin page, the character become a mess. How can I resolve the problem?

I think I have the same problem with Nurapipi here
http://www.zen-cart.com/showthread.php?93439-UTF-8-Zen-Cart-Tutorial-for-v1-3-x/page2

It seems Nurapipi resolved the problem by changing to another server, but is there any other way to resolve the issue? Because there are so many hosting service in the Internet and it is difficult to try all of them.

Thank you.

25 Jan 2014, 1:37 AM
#36
fashions avatar

fashions

New Zenner

Join Date:
Apr 2004
Location:
new mexico usa
Posts:
27
Plugin Contributions:
0

Re: ability to define DB_CHARSET in v1.3.9?

DrByte:

Create a new file for it:

/includes/extra_configures/my_db_charset.php

<?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 versions after v1.5.0 since they will be utf8 already. Thank you double for me too, DrByte. version 1.5.1 I have been reviewing recent upgrade from 1.3.8 to 1.5.1 completed by host, and had many descriptions with ? inside black diamonds scattered on site. This conflict in Charset caused some product pages to go blank in name and description fields in admin side. Site now is without strange characters and admin side is ready for editing old product descriptions if needed.