Zen Cart Logo
Forums / Addon Language Packs / Problem viewing Hebrew stored in zen_orders table

Problem viewing Hebrew stored in zen_orders table

Locked

Views: 2,805

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
19 Jul 2009, 7:45 AM
#1
elibaba avatar

elibaba

New Zenner

Join Date:
Apr 2009
Location:
Israel
Posts:
23
Plugin Contributions:
0

Problem viewing Hebrew stored in zen_orders table

Hello,

My configuration is :

Zen Cart 1.3.8a
PHP Version 5.2.8
Database Patch Level: 1.3.8
Database: MySQL 5.0.67.d7-ourdelta-log
GoDaddy Linux Hosting
MySQL db encoding: UTF-8 Unicode (utf8)
Hebrew lang pack installed. I see "MISSING LANGUAGE FILES OR DIRECTORIES" warning in the top of the page, appealingly no affect.

admin charset :charset=iso-8859-1
front site charset : charset=windows-1255

All relevant db columns are utf8_general_ci, and of course this includes delivery_street_address and similar.

The problem is that my site (mineralz.biz) is dual language, English+Hebrew, and when a new customer registers and issues an order, if the address details are in Hebrew - I see them as question marks both in my admin and the site.

Of course this makes it pretty hard to print a packing slip and invoice, and also looks bad from customer care point of view.

BTW - the Hebrew values in phpmyadmin display perfectly. And in the notification mail that the admin gets on a new order, the address details are also shown correctly in Hebrew.

Any Ideas :blink: ?

19 Jul 2009, 1:28 PM
#2
drbyte avatar

drbyte

Sensei

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

Re: Problem viewing Hebrew stored in zen_orders table

elibaba:

Hebrew lang pack installed. I see "MISSING LANGUAGE FILES OR DIRECTORIES" warning in the top of the page, appealingly no affect.
That message means that you didn't install all the language-pack files for all the languages you have configured in your admin.

In v1.3.x, a proper language pack includes these components:

  • /includes/languages/LANGUAGE_NAME.php (file)
  • /includes/languages/LANGUAGE_NAME/xxxxxxx.php (several files in this folder)
  • /admin/includes/languages/LANGUAGE_NAME.php (file)
  • /admin/includes/languages/LANGUAGE_NAME/xxxxxxx.php (several files in this folder)

If you are missing one or more of those components, that message will be displayed.

I suspect you've not installed the admin version of the language files, and thus your admin isn't using the proper character-set (probably need UTF-8) when handling the display of information for pages in the alternate language.

19 Jul 2009, 5:13 PM
#3
elibaba avatar

elibaba

New Zenner

Join Date:
Apr 2009
Location:
Israel
Posts:
23
Plugin Contributions:
0

Re: Problem viewing Hebrew stored in zen_orders table

Thanks for the reply, but that does not explain why the Hebrew is not displayed correctly in the store front too.

Other data from the DB (like shipping option names) is displayed correctly in the store front, just as it's stored in the DB (I believe that they are indeed DB values and not PHP defines).

I converted basically all the DB to UTF-8 unicode so I am really stomped about this issue.

23 Jul 2009, 5:16 PM
#4
elibaba avatar

elibaba

New Zenner

Join Date:
Apr 2009
Location:
Israel
Posts:
23
Plugin Contributions:
0

Re: Problem viewing Hebrew stored in zen_orders table

Hi All,

I managed to solve my problem and came back to write about the solution for other people who might encounter it.

On the database all was fine, as I presumed.

The problem was that my site had the encoding windows-1255 in the header. This cause all UTF-8 text that came from the DB to look like gibberish.

If I changed manually in the browser to UTF-8 encoding, the the DB text was ok but all the rest (that comes from define() statements) was gibberish.

I had to change the site encoding to UTF-8, and tediously edit each and every php file under the hebrew folder and save it as UTF-8.

PLEASE NOTE - you cannot do it with windows notepad!!!

I wasted hours on this :wacko:, before I realized that windows notepad saves as UTF-8 with signature, that breaks the PHP (it causes characters to be written to the output stream before the headers = blank pages), so you gotta use editor like notepad2 that can save UTF-9 without signature.

23 Jul 2009, 7:40 PM
#5
drbyte avatar

drbyte

Sensei

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

Re: Problem viewing Hebrew stored in zen_orders table

elibaba:

so you gotta use editor like notepad2 that can save UTF-9 without signature.

I think you meant to say "... that can save UTF-8 without BOM".

It's true:** Anytime you work with UTF-8 files for your website, you need to save the files with the encoding specified as "UTF-8 without BOM". **

FYI ... Zen Cart 2.0 will require that you edit all language and template files using a UTF-8 compatible text editor such as Notepad++.

("BOM" is short for byte-order-mark, which you can study more about on wikipedia or google if so desired)