Results 1 to 10 of 11

Hybrid View

  1. #1
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    4,510
    Plugin Contributions
    127

    Default Handling of files and data containing ® (registered trademark symbol)

    Zen Cart does not handle this well right now. For instance, a ® symbol in a file in html_includes will yield this error when the defines pages editor is used from admin:

    [09-Aug-2012 00:35:33 UTC] PHP Warning: htmlspecialchars(): Invalid multibyte sequence in argument in /var/www/html/mysite/myadmin/define_pages_editor.php on line 188

    ... and the define page is blank in admin (since the default behavior of htmlspecialchars is to return nothing in the event of an error.)

    This can be resolved by using ENT_IGNORE in the htmlspecialchars call in admin/define_pages_editor.php line 194.

    Of course, there are a number of htmlspecialchars calls ... and unfortunately a lot of the cart's descriptions contain the registered trademark symbol.

    Any other suggestions?
    Scott C Wilson, That Software Guy, Plugin Moderator
    Contributions: Quantity Discounts, Better Together, SMS on Sale, Gift Wrap at Checkout, and more.

  2. #2
    Join Date
    Jan 2004
    Posts
    58,460
    Blog Entries
    3
    Plugin Contributions
    111

    Default Re: Handling of files and data containing ® (registered trademark symbol)

    What PHP version?
    What CHARSET and DB_CHARSET ?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donations always welcome: www.zen-cart.com/donate

    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
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    4,510
    Plugin Contributions
    127

    Default Re: Handling of files and data containing ® (registered trademark symbol)

    PHP 5.3.10 (local) and 5.2.17 (on server);
    CHARSET/DB_CHARSET utf8.
    Scott C Wilson, That Software Guy, Plugin Moderator
    Contributions: Quantity Discounts, Better Together, SMS on Sale, Gift Wrap at Checkout, and more.

  4. #4
    Join Date
    Jan 2004
    Posts
    58,460
    Blog Entries
    3
    Plugin Contributions
    111

    Default Re: Handling of files and data containing ® (registered trademark symbol)

    I'm not seeing any such characters in a fresh 1.5.0 install.
    And inserting ® via the admin, saving, re-opening, saving, re-opening, etc, doesn't trigger any problems here. PHP 5.3.3 on this particular site.

    Did your files come from an older version, based on iso-8859-1 character set?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donations always welcome: www.zen-cart.com/donate

    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 2006
    Location
    Tampa Bay, Florida
    Posts
    4,510
    Plugin Contributions
    127

    Default Re: Handling of files and data containing ® (registered trademark symbol)

    Yes. Add an ® to a file in html_includes/YOUR_TEMPLATE using a text editor, then try to open it from defines pages editor.
    Last edited by swguy; 9 Aug 2012 at 02:12 AM.
    Scott C Wilson, That Software Guy, Plugin Moderator
    Contributions: Quantity Discounts, Better Together, SMS on Sale, Gift Wrap at Checkout, and more.

  6. #6
    Join Date
    Jan 2004
    Posts
    58,460
    Blog Entries
    3
    Plugin Contributions
    111

    Default Re: Handling of files and data containing ® (registered trademark symbol)

    Okay, when I use a text-editor and tell it to save the file as iso-8859-1 and add a multibyte character to it and save and then load it to my server and try to open it in Zen Cart which is set to UTF8, then I get the same problem.

    And that's to be expected.

    But if I set my editor to use UTF8 just like my Zen Cart is set to use UTF8, then I don't have any problem. And of course one should always use the same character-set / encoding consistently across all editing/storage platforms.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donations always welcome: www.zen-cart.com/donate

    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. Easy Populate and Excel data handling
    By jackryan in forum All Other Contributions/Addons
    Replies: 13
    Last Post: 12 Aug 2010, 04:22 AM
  2. Download some files only if registered
    By monkeyjr47906 in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 29 Jun 2008, 11:08 PM
  3. Files containing SQL queries
    By gnotapipe in forum General Questions
    Replies: 7
    Last Post: 6 Jul 2006, 07:03 PM

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
  •