French (special) characters not saved in mail template

Discussion in 'Common issues' started by Recif, Jun 22, 2016.

  1. Recif

    Recif New Member

    Joined:
    Jun 21, 2016
    Messages:
    24
    Likes Received:
    2
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    1
    Hello,

    When I save my email template, all caracters éêà etc are removed with the right letter. Example : I put "amélioration", I save my template, then I reload it and I have "amioration" instead... Any idea??
     
  2. frm.mwz

    frm.mwz Well-Known Member

    Joined:
    Mar 8, 2016
    Messages:
    3,711
    Likes Received:
    680
    S.E:
    2019-11-27 02:17:39
    L.T:
    Regular
    L.C:
    7
    does it say utf8 in your code?
    do u have all necessary extensions on the server (run also mwz requirements checker)?
    just tested it, and it saves the word as you supplied it and it sends it out correctly, see attached
    (it probably is not a bug, but a matter of settings or server setup)
     

    Attached Files:

  3. Recif

    Recif New Member

    Joined:
    Jun 21, 2016
    Messages:
    24
    Likes Received:
    2
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    1
    Hello,

    Yes, utf8 on the source page.
    I ran checker, reult : Congratulations! Your server configuration satisfies all requirements by MailWizz EMA.

    My php.ini have the charset on ISO, but this is necessary for my main domain.
     
  4. frm.mwz

    frm.mwz Well-Known Member

    Joined:
    Mar 8, 2016
    Messages:
    3,711
    Likes Received:
    680
    S.E:
    2019-11-27 02:17:39
    L.T:
    Regular
    L.C:
    7
    what happens if you leave the charset unset (no default value) in php.ini
    and
    what happens if you put it to utf-8
    ?
     
  5. Recif

    Recif New Member

    Joined:
    Jun 21, 2016
    Messages:
    24
    Likes Received:
    2
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    1
    Yes, it works... But I can't change this... So how to manage that? :-(
     
  6. frm.mwz

    frm.mwz Well-Known Member

    Joined:
    Mar 8, 2016
    Messages:
    3,711
    Likes Received:
    680
    S.E:
    2019-11-27 02:17:39
    L.T:
    Regular
    L.C:
    7
    not sure what you mean
    pls explain

    what does work?

    what can u not change?

    my best guess is that you may need individual php.ini files for certain directories, but after the above 2 questions herein are answered, it might be possible to give better advice
     
  7. Recif

    Recif New Member

    Joined:
    Jun 21, 2016
    Messages:
    24
    Likes Received:
    2
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    1
    I hadded these 2 lines in the .htaccess but it oesn't work :

    AddDefaultCharset utf-8
    php_value default_charset UTF-8
     
  8. Recif

    Recif New Member

    Joined:
    Jun 21, 2016
    Messages:
    24
    Likes Received:
    2
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    1
    It works: I mean the special chars are kepts in my templates.
    I can't because the main site of this domain is using iso chars
     
  9. frm.mwz

    frm.mwz Well-Known Member

    Joined:
    Mar 8, 2016
    Messages:
    3,711
    Likes Received:
    680
    S.E:
    2019-11-27 02:17:39
    L.T:
    Regular
    L.C:
    7
    so that was, why the website worked, but not the templates?
     
  10. Recif

    Recif New Member

    Joined:
    Jun 21, 2016
    Messages:
    24
    Likes Received:
    2
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    1
    Yes, I changed the Default_charset = UTF-8 in the php.ini, then I go on my template page, put some chars like ééé, then save the template and then reload it: the chars ééé were still there, so it works!
    If I put Default_charset = ISO-xxxx, then my chars ééé disapear afetr the template is saved...
     
  11. Recif

    Recif New Member

    Joined:
    Jun 21, 2016
    Messages:
    24
    Likes Received:
    2
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    1
    I don't know why the website works and not the templates...
     
  12. frm.mwz

    frm.mwz Well-Known Member

    Joined:
    Mar 8, 2016
    Messages:
    3,711
    Likes Received:
    680
    S.E:
    2019-11-27 02:17:39
    L.T:
    Regular
    L.C:
    7
    so you changed it back from utf8 in php.ini?

    have you tried iso-8859-1?
     
  13. frm.mwz

    frm.mwz Well-Known Member

    Joined:
    Mar 8, 2016
    Messages:
    3,711
    Likes Received:
    680
    S.E:
    2019-11-27 02:17:39
    L.T:
    Regular
    L.C:
    7
    so why not leave it with utf8 if it works?

    you may have to find a real solution for the website
    what is running there?
     
  14. Recif

    Recif New Member

    Joined:
    Jun 21, 2016
    Messages:
    24
    Likes Received:
    2
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    1
    No.

    Initialy, the Default_charset = ISO-8859-1
    This is my setting to make the root domain works with correct chars displayed on page (old website)
    The Mailwizz is a subdirectory of this site (/mailing).
    In this configuration, the chars are not working inside templates.

    So, I modified Default_charset = UTF-8 to test. Then yes, it works in that configuration : the templates are saving my special chars.
    But I return back to Default_charset = ISO-8859-1 because my chars on the main site (not maiwizz) are all broken.
     
  15. frm.mwz

    frm.mwz Well-Known Member

    Joined:
    Mar 8, 2016
    Messages:
    3,711
    Likes Received:
    680
    S.E:
    2019-11-27 02:17:39
    L.T:
    Regular
    L.C:
    7
    that is the problem

    always have each site, each program in their own directory, not nested (ie sub dir, or even sub dir of sub dir, etc)

    then you can set the php.ini for each directory and have it your way

    (you see, when you describe it properly, things become clear, and help is truly possible)
     
  16. Recif

    Recif New Member

    Joined:
    Jun 21, 2016
    Messages:
    24
    Likes Received:
    2
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    1
    Well... I have to setup a new domain just for Mailwizz??
     
  17. frm.mwz

    frm.mwz Well-Known Member

    Joined:
    Mar 8, 2016
    Messages:
    3,711
    Likes Received:
    680
    S.E:
    2019-11-27 02:17:39
    L.T:
    Regular
    L.C:
    7
    (a separate) directory (for mwz) under public_html

    not (a new) domain

    use the server control panel to determine where a domain points to (which directory), and/or
    use 'htaccess rewrite rules' to coordinate sites/directories/files
     
  18. Recif

    Recif New Member

    Joined:
    Jun 21, 2016
    Messages:
    24
    Likes Received:
    2
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    1
    It will not solve my problem as the php.ini file is for the whole domain under /public_html
     
  19. frm.mwz

    frm.mwz Well-Known Member

    Joined:
    Mar 8, 2016
    Messages:
    3,711
    Likes Received:
    680
    S.E:
    2019-11-27 02:17:39
    L.T:
    Regular
    L.C:
    7
    that's not how it works

    you can put an individual php.ini into each (sub)directory

    but to avoid putting one into so many ((sub)dirs), you better have the proper structure

    (this has all been tried and tested, many times)
     
  20. Recif

    Recif New Member

    Joined:
    Jun 21, 2016
    Messages:
    24
    Likes Received:
    2
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    1
    So why I can't simply put a php.ini for the /mailing subdir? (I tryed but it doesn't seem to work)
     

Share This Page