Results 1 to 7 of 7
  1. #1
    Join Date
    Feb 2012
    Location
    Sherbrooke QC Canada
    Posts
    6
    Plugin Contributions
    0

    red flag CP module displaying symbols in accents

    Good day. This might not be the right place to ask what to do, but I am not entirely sure the problem is with the module.

    I am using the latest Canada Post 1.50 contribution (by Dr. byte, I believe) with my Zen Cart. When I ask delivery prices on checkout in french, I get the right rates, but have accents replaced with black "?" symbols (IE: "Colis acéléré" is displayed as "Colis ac?l?r?").

    My accents DO display properly all over my site and have set "@setlocale(LC_TIME, 'fr_CA.utf8');" in my CUSTOM french.php file. This problem is happening on both my Zen Cart stores:

    www.servicesinfosl.com
    www.boutiqueimpasse.com

    It is only the results coming back from Canada Post XML that returns what seams to be the wrong coding. Anyone have a solution / workaround and have also encountered the same problem?

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,399
    Plugin Contributions
    87

    Default Re: Custom module displaying symbols in accents

    Are you saving your custom French language files as "UTF8 without BOM"?

  3. #3
    Join Date
    Feb 2012
    Location
    Sherbrooke QC Canada
    Posts
    6
    Plugin Contributions
    0

    Default Re: Custom module displaying symbols in accents

    I think so. The original files were translated in house using the v1.5.0 distribution English source code. I use Crimson Editor to edit php files. Only Canada Post service description does this. I have no issues anywhere else concerning this.

  4. #4
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Custom module displaying symbols in accents

    I recall a similar issue from awhile back. Does this help? ... http://www.zen-cart.com/showthread.p...052#post620052
    .

    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.

  5. #5
    Join Date
    Feb 2012
    Location
    Sherbrooke QC Canada
    Posts
    6
    Plugin Contributions
    0

    Default Re: Custom module displaying symbols in accents

    Thanks for the reply. I just checked and that mod is already in place. :-(

  6. #6
    Join Date
    Feb 2012
    Location
    Sherbrooke QC Canada
    Posts
    6
    Plugin Contributions
    0

    Default Re: Custom module displaying symbols in accents

    I have found the solution! Thanks to DrByte's suggestion, I actually added to the original code:

    Code:
    $methods = array();
          for ($i = 0; $i < sizeof($canadapostQuote); $i ++) {
            list ($type, $cost) = each($canadapostQuote[$i]);
            $type = html_entity_decode($type);
            if ($this->cp_online_handling == true) {
              if ($method == '' || $method == $type) {
    And added the following:

    Code:
    $methods = array();
          for ($i = 0; $i < sizeof($canadapostQuote); $i ++) {
            list ($type, $cost) = each($canadapostQuote[$i]);
            $type = utf8_encode(html_entity_decode($type));
            if ($this->cp_online_handling == true) {
              if ($method == '' || $method == $type) {
    This fixes permanently the problem. I guess that Canada Post XML does not return UTF-8 encoded results. This FORCES UTF-8 on the results.

    Hope this fix is IMPLEMENTED in the CANADA POST module and helps others cursed with the many accent problems. Thanks DrByte!

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

    Default Re: Custom module displaying symbols in accents

    This thread has been moved out of the Bug Reports area since it's not a bug with Zen Cart itself.
    .

    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. v151 Symbols such as £ sign not displaying correctly in product descriptions
    By paintersinn in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 15 Jan 2013, 01:10 PM
  2. French accents in address
    By paul3648 in forum General Questions
    Replies: 0
    Last Post: 25 Apr 2011, 10:11 PM
  3. spanish accents show up as �
    By stromboli in forum Upgrading from 1.3.x to 1.3.9
    Replies: 10
    Last Post: 31 Jul 2010, 11:16 PM
  4. [Done v2.0] spanish zones missing accents
    By torvista in forum Bug Reports
    Replies: 0
    Last Post: 26 Jul 2010, 08:14 AM
  5. Remove the french canadian accents
    By [email protected] in forum Basic Configuration
    Replies: 3
    Last Post: 11 May 2006, 04:34 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