Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Jul 2019
    Location
    FL
    Posts
    6
    Plugin Contributions
    0

    Default Invalide Characters in Order Confirmation Email

    presently using: v1.5.4

    We have not made any recent updates to the website but all of the sudden apostrophes are turning into "’" in the order confirmation email. But it is only happening in the text the customer has filled in.

    For example:
    Name:  Screen Shot 2019-07-03 at 5.15.41 PM.png
Views: 150
Size:  21.5 KB
    So now everyone with a name like Billy's Handyman Services looks like the attached image. It's happening consistently this way.

    We're using TEXT emails. I've checked the CHARSET and it's still set to utf-8. The rest of our website is fine and this isn't happening anywhere else except the Order Confirmation email. Any ideas on what might be happening?

  2. #2
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,133
    Plugin Contributions
    11

    Default Re: Invalide Characters in Order Confirmation Email

    Try looking thru the first similar thread below. This is why I generally search using Google with Zen Cart added on the end of the search string. The forum's search is less than worthy.

  3. #3
    Join Date
    Jul 2019
    Location
    FL
    Posts
    6
    Plugin Contributions
    0

    Default Re: Invalide Characters in Order Confirmation Email

    I actually did read that thread and my Charset is set to what they recommended. In both places.

    I figured maybe my issue was different since it's only the text typed in by the customer? I have no idea.

  4. #4
    Join Date
    Oct 2018
    Location
    UK
    Posts
    26
    Plugin Contributions
    3

    Default Re: Invalide Characters in Order Confirmation Email

    Make sure that you are serving your HTML as UTF-8:
    header("Content-Type: text/html; charset=utf-8");
    Change your PHP default charset to utf-8:
    ini_set("default_charset", 'utf-8');
    If your database doesn't ALWAYS talk in utf-8, then you may need to tell it on a per connection basis to ensure it's in utf-8 mode, in MySQL you do that by issuing:
    charset utf8
    You may need to tell your webserver to always try to talk in UTF8, in Apache this command is:
    AddDefaultCharset UTF-8
    Finally, you need to ALWAYS make sure that you are using PHP functions that are properly UTF-8 complaint. This means always using the mb_* styled 'multibyte aware' string functions. It also means when calling functions such as htmlspecialchars(), that you include the appropriate 'utf-8' charset parameter at the end to make sure that it doesn't encode them incorrectly.


    copied from a google search ^^^^^^^^^^^^^^^^^^

    change you Charset set to Utf8mb4_bin

  5. #5
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Invalide Characters in Order Confirmation Email

    Are or were these entries from existing customers that had an account before setting up ZC 1.5.4? Are they new customers?

    Along the lines of vapeshopmeuk's post, the template being used, how does its template files compare to those of the default version of the file? There were changes made to some of the template files to support display of content to push for display of information using the full declaration that would match what was setup.

    As to changes, sure mentioned hadn't "recently" made changes, but don't forget that support software for operation may have been updated by the host so it would be good to look at associated changes such as php version.

    Also and although that particular line of content doesn't appear to be related to the field I have in mind, but I thought that one or more fields during checkout had been sent through some sort of additional sanitization though that conversion does look like a character set issue. That's just from looking at the character(s) displayed as a result of whatever is going on...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  6. #6
    Join Date
    Jul 2019
    Location
    FL
    Posts
    6
    Plugin Contributions
    0

    Default Re: Invalide Characters in Order Confirmation Email

    It's happening with new and old customers. And again, only in the information the customers types in.

    I am not sure what the default templates were. I don't know Zen Cart back end at all. I didn't build the website. I know very basic coding and since this is only happening with this one little thing I wanted to try to fix it myself but this might be over my head at this point.

    I have no idea where to look for any of that stuff vapeshopmeuk posted. I used the Developers toolkit and in the init_templates.php file I found this:

    Code:
    header("Content-Type: text/html; charset=" . CHARSET);
    Is that the problem?

  7. #7
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Invalide Characters in Order Confirmation Email

    Quote Originally Posted by webpi4l View Post
    It's happening with new and old customers. And again, only in the information the customers types in.

    I am not sure what the default templates were. I don't know Zen Cart back end at all. I didn't build the website. I know very basic coding and since this is only happening with this one little thing I wanted to try to fix it myself but this might be over my head at this point.

    I have no idea where to look for any of that stuff vapeshopmeuk posted. I used the Developers toolkit and in the init_templates.php file I found this:

    Code:
    header("Content-Type: text/html; charset=" . CHARSET);
    Is that the problem?
    Dig again: what value(s) are assigned to CHARSET in your store?

    See, it may be a problem for display in one way and not another... the problem being that CHARSET is one value at one point and another elsewhere.

    So are you able to reproduce the issue by your own entry while stepping through the store? If so, at what page was the data entered that resulted in a problem, what plugins are installed that might affect that page? Does the problem persist if you temporarily use the default (unaltered) classic template?

    Are there places where the apostrophe or similar can be added by the customer and not get messed up but not others? The contact us email for example?
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  8. #8
    Join Date
    Jul 2019
    Location
    FL
    Posts
    6
    Plugin Contributions
    0

    Default Re: Invalide Characters in Order Confirmation Email

    I just placed an order and oh my goodness it is ONLY happening on that first line! How bizarre is that? That first field is practically on all of our products. And it's happening with every order that has an apostrophe in the name. & signs seem to be OK. I did not test the pound sign. Should I have tried any others?

    I do not know how to temporarily use the default classic template... this is a very active live website so i hesitate to switch anything off... it's also been functioning fine for about 5 years. I'm puzzled. This did happen around the time the new PHP became available & for a few days fixed itself... but to my knowledge we haven't updated our PHP but I'm still waiting for comment from our host.

    Where do I look for the CHARSET in my store?

  9. #9
    Join Date
    Jul 2019
    Location
    FL
    Posts
    6
    Plugin Contributions
    0

    Default Re: Invalide Characters in Order Confirmation Email

    Oh my you can't edit posts in here. Sorry for the double.

    But...

    I just thought to look at the orders on the back end of the website and the funny characters do not appear there either. It is only in the email and appears to only be effecting that one field.

    And if you tell me the only option is to delete that field I may cry cause uuuuh we have like 1000 products its on. So. Yeah.

  10. #10
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,472
    Plugin Contributions
    88

    Default Re: Invalide Characters in Order Confirmation Email

    Check your store's /email/email_template_checkout.html. Is that file saved as ASCII or UTF8 encoding? If it's ASCII, try saving it using UTF8 encoding (Notepad++ provides such an option) to see if that's the source of the issue.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v151 Î Ş Ţ Ă Â Characters in e-mail Order Confirmation Problem
    By Adrian Ciocîrlan in forum Customization from the Admin
    Replies: 12
    Last Post: 17 Dec 2018, 01:20 PM
  2. welcome email problem and order confirmation email problems
    By oneelios in forum General Questions
    Replies: 1
    Last Post: 22 Jan 2010, 11:18 AM
  3. Replies: 4
    Last Post: 9 Jun 2009, 08:17 PM
  4. How do I Edit Order of Order Totals in Order Confirmation Email?
    By toussi in forum Managing Customers and Orders
    Replies: 1
    Last Post: 20 Mar 2009, 08:05 AM
  5. Order Confirmation Email - strange characters
    By dab in forum General Questions
    Replies: 3
    Last Post: 17 Feb 2007, 12:14 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