Zen Cart Logo
Forums / Addon Language Packs / UTF-8 Zen-Cart Tutorial for v1.3.x

UTF-8 Zen-Cart Tutorial for v1.3.x

Views: 77,326

Results 41 to 60 of 145
20 May 2009, 11:46 AM
#41
duul avatar

duul

New Zenner

Join Date:
May 2009
Posts:
6
Plugin Contributions:
0

UTF-8 Zen-Cart Tutorial for v1.3.x

Thanks!

:)

7 Jul 2009, 5:41 PM
#42
kobra8 avatar

kobra8

Zen Follower

Join Date:
Mar 2009
Location:
Serbia
Posts:
350
Plugin Contributions:
0

Re: UTF-8 Zen-Cart Tutorial for v1.3.x

I set UTF-8 end i have o.k. character. But in Opera end IE the font is different (bigger) in Firefox font is good.
Hay it's possible!

7 Jul 2009, 6:03 PM
#43
kobra8 avatar

kobra8

Zen Follower

Join Date:
Mar 2009
Location:
Serbia
Posts:
350
Plugin Contributions:
0

Re: UTF-8 Zen-Cart Tutorial for v1.3.x

kobra8:

I set UTF-8 end i have o.k. character. But in Opera end IE the font is different (bigger) in Firefox font is good.
Hay it's possible!

With http://validator.w3.org while checking this document as XHTML 1.0 Transitional faund:
The Unicode Byte-Order Mark (BOM) in UTF-8 encoded files is known to cause
problems for some text editors and older browsers. You may want to consider
avoiding its use until it is better supported.

Is thet problem with font in IE, Opera end Firefox?

7 Jul 2009, 11:14 PM
#44
crystalkoi avatar

crystalkoi

Zen Follower

Join Date:
Apr 2007
Posts:
181
Plugin Contributions:
0

Re: UTF-8 Zen-Cart Tutorial for v1.3.x

Font size is part of css. Note the part where it says, Older text editors and browsers. Anything above IE6, you will have no problem with UTF-8.

With font, you need to adjust your css.

Regards,

CKD

11 Aug 2009, 10:52 PM
#45
beemisc avatar

beemisc

New Zenner

Join Date:
Aug 2009
Posts:
1
Plugin Contributions:
0

Re: UTF-8 Zen-Cart Tutorial for v1.3.x

Thanks for the instructions. I have followed the steps (modify the php files) except that I use MySQL Administrator UI to change the default collation to utf8_general_ci. Restart the MySQL Service, create the database.

When trying to install Zen Cart, I got this error:

Installation In Progress...

~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ 

~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ 

~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ 
1366 Incorrect string value: '\xA3:&eur...' for column 'configuration_value' at row 1
in:
[INSERT INTO szc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('Convert currencies for Text emails', 'CURRENCIES_TRANSLATIONS', '£,£:€,€', 'What currency conversions do you need for Text emails?
Default = £,£:€,€', 12, 120, NULL, '2003-11-21 00:00:00', NULL, 'zen_cfg_textarea_small(');]

I am not sure what I am missing here. Could you give a hint?

Thanks!

12 Aug 2009, 2:33 AM
#46
drbyte avatar

drbyte

Sensei

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

Re: UTF-8 Zen-Cart Tutorial for v1.3.x

That's because the .sql file containing the initial database load in v1.3.x contains several non-UTF-8 characters in it, and you've set your database to be 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.

14 Aug 2009, 8:40 AM
#47
shirster avatar

shirster

Zen Follower

Join Date:
Sep 2005
Location:
Hong Kong
Posts:
301
Plugin Contributions:
0

Re: UTF-8 Zen-Cart Tutorial for v1.3.x

Hi everyone,

I've installed a 1.3.8a ZC recently, and am having trouble with the UTF8. This is not the 1st time I work on Chinese ZC stores, but it's been years since the last install so I can't remember what I did to get the other stores working...

I've followed the instructions here : http://www.srw2d.com/content/utf-8-zen-cart

But when I tried to edit the query_factory.php file I ran into a problem.

Here is a rundown of what happened :

  1. Installed ZC 1.3.8a and the traditional Chinese language pack (I forgot to do the recommended changes before installation).
  2. After the store and Chinese language are both installed and working, I went ahead and did the changes as per instructions at srw2d.com.
  3. After I edited query_factory.php I got a blank page at my store.

Current store settings :

  1. MySQL connection collation is utf8_unicode_ci
  2. My ZC database collation is utf8_general_ci
  3. Everything looks fine at the shop and admin
  4. All Chinese characters became "aliens" in the database
  5. If I edit the database fields directly, I can read the Chinese characters in the database but they become "aliens" at the front end

I hope I don't have to start the whole thing over... any help would be much appreciated ! Thanks in advance ! :)

Shirley

14 Aug 2009, 11:22 AM
#48
drbyte avatar

drbyte

Sensei

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

Re: UTF-8 Zen-Cart Tutorial for v1.3.x

shirster:

  1. After I edited query_factory.php I got a blank page at my store.
    Using the Debug Log utility from this article should help you find what's causing the blank page: https://www.zen-cart.com/tutorials/index.php?article=82

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

15 Aug 2009, 12:51 AM
#49
crystalkoi avatar

crystalkoi

Zen Follower

Join Date:
Apr 2007
Posts:
181
Plugin Contributions:
0

Re: UTF-8 Zen-Cart Tutorial for v1.3.x

I will try and post the file on my site so that you can download it and use it.

I have seen this issue before with people. But can never work out why. On Monday, here in Japan, I will post a file to the srw2d.com site and put a link here to download it. You can try that file and see if you still have the same problem.

Regards,

CKD

17 Aug 2009, 9:45 AM
#50
shirster avatar

shirster

Zen Follower

Join Date:
Sep 2005
Location:
Hong Kong
Posts:
301
Plugin Contributions:
0

Re: UTF-8 Zen-Cart Tutorial for v1.3.x

Thanks Dr. Byte and Koi. I haven't tried the debug utility yet, I'd just like to report that if I edit the query_factory.php file BEFORE installation, I couldn't even install, I simply got stuck at the install page.

But if I proceed to install without editing the query_factory.php file, I got alien characters in the database again.

:SIGH:

18 Aug 2009, 1:57 AM
#51
crystalkoi avatar

crystalkoi

Zen Follower

Join Date:
Apr 2007
Posts:
181
Plugin Contributions:
0

Re: UTF-8 Zen-Cart Tutorial for v1.3.x

I attached one file that I know works here:
Attachment #6324

Upload this one to includes/classes/db/mysql/

This overwrites the core file.

Let me know if you still get the error after this,

Regards,

Shaun

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

18 Aug 2009, 3:02 AM
#52
shirster avatar

shirster

Zen Follower

Join Date:
Sep 2005
Location:
Hong Kong
Posts:
301
Plugin Contributions:
0

Re: UTF-8 Zen-Cart Tutorial for v1.3.x

Shaun... YOU SAVE MY LIFE !!!!!!!!!!!! It works now ! (Though I used BBEdit to compare the documents and still don't know what went wrong ^^)

Arigato !!!!!!!!!!!!!!! (^o^)/

18 Aug 2009, 3:18 AM
#53
crystalkoi avatar

crystalkoi

Zen Follower

Join Date:
Apr 2007
Posts:
181
Plugin Contributions:
0

Re: UTF-8 Zen-Cart Tutorial for v1.3.x

Nice to hear.

Wonder what the problem is? Maybe you can attach your file and I can look at it, or the Dr. if he has time.

18 Aug 2009, 1:20 PM
#54
e81ny avatar

e81ny

New Zenner

Join Date:
Feb 2007
Location:
New York
Posts:
88
Plugin Contributions:
0

Re: UTF-8 Zen-Cart Tutorial for v1.3.x

Hi,

After installed, when I switch from English to Japanese in Admin, I got this message on the top of the page:

Warning: Cannot modify header information - headers already sent by (output started at /homepages/24/d293486072/htdocs/GooGooNY/includes/languages/japanese.php:2) in /homepages/24/d293486072/htdocs/GooGooNY/includes/init_includes/init_templates.php on line 36

Also, everything I input in Japanese for product or EZ Pages, they all come out like this: "????????"

What have I done wrong? I'm pretty sure I followed every step correctly..

Please help! Thanks.

24 Aug 2009, 1:12 PM
#55
e81ny avatar

e81ny

New Zenner

Join Date:
Feb 2007
Location:
New York
Posts:
88
Plugin Contributions:
0

Re: UTF-8 Zen-Cart Tutorial for v1.3.x

Hello,

Everything is good now; I've found the reason why the Japanese wasn't displayed correctly.

But I still have problem with the admin panel. Everytime when I switch from English to Japanese, it doesn't pick up that it is UTF-8 even though it IS UTF-8 according to the source code. It always uses other language coding and of course, the text just cannot be read. What's more annoying is that every page you go (in admin area), I have to change the code to UTF-8 manually everytime...

What should I do?

25 Aug 2009, 8:37 AM
#56
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: UTF-8 Zen-Cart Tutorial for v1.3.x

@CrystalKoi: I have written a script that will automatically convert all appropriate zen table fields to utf8. If this works with no problem it would be great for running stores. I will keep you updated.

I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

3 Sep 2009, 2:08 AM
#57
crystalkoi avatar

crystalkoi

Zen Follower

Join Date:
Apr 2007
Posts:
181
Plugin Contributions:
0

Re: UTF-8 Zen-Cart Tutorial for v1.3.x

e81ny:

Hello,

Everything is good now; I've found the reason why the Japanese wasn't displayed correctly.

But I still have problem with the admin panel. Everytime when I switch from English to Japanese, it doesn't pick up that it is UTF-8 even though it IS UTF-8 according to the source code. It always uses other language coding and of course, the text just cannot be read. What's more annoying is that every page you go (in admin area), I have to change the code to UTF-8 manually everytime...

What should I do?

Sorry for the late reply here. Go into your admin language file. admin/includes/japanese.php and look for where it says

define('CHARSET', 'utf8');  

change that to :

define('CHARSET', 'utf-8');

Sorry about that, its a known issue. FF handles it fine, but IE does not.

3 Sep 2009, 2:11 AM
#58
crystalkoi avatar

crystalkoi

Zen Follower

Join Date:
Apr 2007
Posts:
181
Plugin Contributions:
0

Re: UTF-8 Zen-Cart Tutorial for v1.3.x

@yellow1912 - you might want to contact Dr. Byte as I know he is trying to work this into the install for 2.0. Maybe it could be some help to him. It would be a great tool for the community!

24 Sep 2009, 8:30 PM
#59
spiritus avatar

spiritus

New Zenner

Join Date:
Apr 2009
Location:
Slovenia
Posts:
58
Plugin Contributions:
0

Re: UTF-8 Zen-Cart Tutorial for v1.3.x

Hi there..
I'm having problems with my site..
I followed steps from CrystalKoi, but characters are not ok..

But there is one thing I must say...
I'm switching server for my store!
After fresh install of new one I made a collation in database to utf8_general_ci, then I import SQL database backup from old store.
And then collation changes to latin1_swedish_ci, I don't know why..
In my language pack is everything changed to utf-8.

When I change query_factory file is result even worser..
Can anyone help me please...

Here is my site..
https://www.pilica.si

25 Sep 2009, 12:58 AM
#60
crystalkoi avatar

crystalkoi

Zen Follower

Join Date:
Apr 2007
Posts:
181
Plugin Contributions:
0

Re: UTF-8 Zen-Cart Tutorial for v1.3.x

Hi Spiritus,

The database you importing, that data is stored in latin1_swedish_ci I am guessing, no?

And if you change the collation, yes it will get worse if you don't have your information in UTF-8.

Check the database you are importing.

Regards,

CKD