Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2009
    Location
    Israel
    Posts
    23
    Plugin Contributions
    0

    Default 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 ?

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Problem viewing Hebrew stored in zen_orders table

    Quote Originally Posted by elibaba View Post
    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.
    .

    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. #3
    Join Date
    Apr 2009
    Location
    Israel
    Posts
    23
    Plugin Contributions
    0

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

  4. #4
    Join Date
    Apr 2009
    Location
    Israel
    Posts
    23
    Plugin Contributions
    0

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

  5. #5
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Problem viewing Hebrew stored in zen_orders table

    Quote Originally Posted by elibaba View Post
    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)
    .

    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.

 

 

Similar Threads

  1. Replies: 0
    Last Post: 26 Feb 2014, 07:21 AM
  2. What DB table are order comments stored?
    By tcarden in forum General Questions
    Replies: 1
    Last Post: 9 Apr 2013, 02:01 AM
  3. Which table are text attributes stored in?
    By rmjr in forum General Questions
    Replies: 1
    Last Post: 11 Aug 2009, 02:07 AM
  4. Change data stored in orders table
    By dev.stefan in forum General Questions
    Replies: 1
    Last Post: 4 Aug 2008, 08:25 AM

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