hello all
i see in the new version that :
so where should i define this???Code:Added ability to define DB_CHARSET to automatically trigger a mysql SET NAMES statement if needed for things like UTF8 support, preventing the need to edit the db class
hello all
i see in the new version that :
so where should i define this???Code:Added ability to define DB_CHARSET to automatically trigger a mysql SET NAMES statement if needed for things like UTF8 support, preventing the need to edit the db class
Create a new file for it:
/includes/extra_configures/my_db_charset.php
Do the same with: /admin/includes/extra_configures/my_db_charset.phpCode:<?php define('DB_CHARSET', 'your_charset_here');
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.
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donations always welcome: www.zen-cart.com/donate
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.
I had to add this line of code when I upgraded to php 5 [ZenCart 138 code doesn't set the encoding of the client connection, so when connecting to a MySQL 5 server, the server will return utf-8 encoded text.]
Should I keep this or go with the new codePHP Code:the code added to includes/classes/db/mysql/query_factory.php line 36:
mysql_set_charset('latin1');
I plan to upgrade this week to 1.39aPHP Code:/includes/extra_configures/my_db_charset.php <?php define('DB_CHARSET', 'your_charset_here');
Zencart 1.3.9h - PHP 5.2.13 - My SQL 5.0.84 - Apache 1.3.41
Using the DB_CHARSET define replaces the need for editing query_factory.php, so you should remove your custom code from that file.
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donations always welcome: www.zen-cart.com/donate
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.
thanks dr byte!![]()
Zencart 1.3.9h - PHP 5.2.13 - My SQL 5.0.84 - Apache 1.3.41
thank you![]()
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!
Donations always welcome: www.zen-cart.com/donate
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.
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.....![]()
Bookmarks