Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    Mar 2004
    Location
    Finland
    Posts
    488
    Plugin Contributions
    3

    Default Again with character encodings...

    Hi,

    A slight problem with encodings again...

    Language files and database are ISO-8859-15 which work perfectly on my devbox and with all the shops I've installed in the past.

    Now this one shop I'm doing now sends the catalog as UTF-8, meaning all the äöåÄÖÅ characters are messed up!

    If I change the encoding by hand in firefox to ISO-8859-15 the page shows correctly....

    Admin side sends pages as ISO-8859-15 and shows all characters correctly.

    I've debugged the catalog side with firefox addon "Live HTTP headers" and it shows a line like this:
    Content-Type: text/html; charset=UTF-8

    Now the question is, how do I change the Content-Type ??

    The encoding settings in language files are set up correctly and the shop has a "<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15" />
    " header in the html.

    Also I've tried to set up the encoding in .htaccess file in the root with all sorts of different setting I've managed to find in the web so far.

    Any help would be greatly appriciated!
    Working with Zen Cart since 2003 :: www.prr.fi
    Author of the original Finnish language pack for Zen Cart since 2004

  2. #2
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Again with character encodings...

    How many "init_templates.php" files do you have on your site? Which folders are they in? How are those files different from the original Zen Cart files?
    What version of Zen Cart are you working with?
    .

    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
    Mar 2004
    Location
    Finland
    Posts
    488
    Plugin Contributions
    3

    Default Re: Again with character encodings...

    There's actually another 1.3.7 version of zencart installed (customers own try of installing zencart previously) which shows the catalog correctly as ISO-8859-15 with the same language files!
    Working with Zen Cart since 2003 :: www.prr.fi
    Author of the original Finnish language pack for Zen Cart since 2004

  4. #4
    Join Date
    Mar 2004
    Location
    Finland
    Posts
    488
    Plugin Contributions
    3

    Default Re: Again with character encodings...

    Quote Originally Posted by DrByte View Post
    How many "init_templates.php" files do you have on your site? Which folders are they in? How are those files different from the original Zen Cart files?
    What version of Zen Cart are you working with?
    I'm working (like always) with the latest version of Zen Cart.

    Is this what you mean?:

    find |grep init_templates.php
    ./includes/init_includes/init_templates.php
    ./admin/includes/init_includes/init_templates.php



    Only edits I have made are made in the template files.
    Working with Zen Cart since 2003 :: www.prr.fi
    Author of the original Finnish language pack for Zen Cart since 2004

  5. #5
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Again with character encodings...

    The Content-Type charset is set in the init_templates.php file, using the constant for CHARSET defined in your language files.
    .

    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.

  6. #6
    Join Date
    Mar 2004
    Location
    Finland
    Posts
    488
    Plugin Contributions
    3

    Default Re: Again with character encodings...

    if I copy the source html code of the main page and save it to a file test.html (or .php), the content is output correctly
    Working with Zen Cart since 2003 :: www.prr.fi
    Author of the original Finnish language pack for Zen Cart since 2004

  7. #7
    Join Date
    Mar 2004
    Location
    Finland
    Posts
    488
    Plugin Contributions
    3

    Default Re: Again with character encodings...

    Quote Originally Posted by DrByte View Post
    The Content-Type charset is set in the init_templates.php file, using the constant for CHARSET defined in your language files.
    Editing this file, by hardcoding a different encoding doesn't make any difference.

    No matter what I set it to the server sends this header:

    Content-Type: text/html; charset=UTF-8
    Working with Zen Cart since 2003 :: www.prr.fi
    Author of the original Finnish language pack for Zen Cart since 2004

  8. #8
    Join Date
    Mar 2004
    Location
    Finland
    Posts
    488
    Plugin Contributions
    3

    Default Re: Again with character encodings...

    Getting weirder by the moment....

    the popup window:
    /index.php?main_page=popup_shipping_estimator

    is showing with ISO-8859-15 with all ä's and ö's as they should be!
    Working with Zen Cart since 2003 :: www.prr.fi
    Author of the original Finnish language pack for Zen Cart since 2004

  9. #9
    Join Date
    Mar 2004
    Location
    Finland
    Posts
    488
    Plugin Contributions
    3

    Default Re: Again with character encodings...

    also login page shows correctly and few other pages.

    It's like the server is guessing the encoding per page and ignoring anything set by zencart!
    Working with Zen Cart since 2003 :: www.prr.fi
    Author of the original Finnish language pack for Zen Cart since 2004

  10. #10
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Again with character encodings...

    Quote Originally Posted by pasi View Post
    There's actually another 1.3.7 version of zencart installed (customers own try of installing zencart previously) which shows the catalog correctly as ISO-8859-15 with the same language files!
    How does that installation differ from what you're working with? Including file encoding methods on each file?
    .

    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.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Russian/Polish Character problem with MySQL
    By hyperjase in forum General Questions
    Replies: 0
    Last Post: 1 Jun 2011, 09:11 AM
  2. Problem with ascii character
    By shabizon in forum General Questions
    Replies: 0
    Last Post: 11 Nov 2010, 06:54 PM
  3. Need help with character limit page.
    By SandraSD in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 26 Sep 2009, 09:07 PM
  4. Issue with russian language character length
    By mfeinf in forum Addon Language Packs
    Replies: 0
    Last Post: 22 Apr 2009, 10:07 AM

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