Problem/Motivation

We had a provider forced change from php 7.4 to php 8.0. Since that time the following characters are misrepresented in emails:

ä - ä
ö - ö
ü - ü
ß - ß
Ä - Ä
Ö - Ö
Ü - Ãœ

I'm quite sure that ths behaviour depends on the php change. Is there a solution or workaround?

Kind regards
Waldemar

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork webform-3325588

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

iceman2202 created an issue. See original summary.

joseph.olstad’s picture

just a hint/suggestion but I recommend enabling the dblog, set the log level to the most sensitive level, look for log errors corresponding around the time the email is sent, you may also want to upgrade any related mail modules or check for patches.
what version of PHP are you using? cgi or fpm? 8.0.22 ?
which OS (Windows, or Linux? ) what web server are you using, Apache or nginx or ms IIS or some other web server?

himanshu_jhaloya made their first commit to this issue’s fork.

himanshu_jhaloya’s picture

Assigned: Unassigned » himanshu_jhaloya

my opinion is to enable the error log dblog module, check the PHP compatibility PHP 8:0 and look for any patches for the respective module

himanshu_jhaloya’s picture

Assigned: himanshu_jhaloya » Unassigned
iceman2202’s picture

Thanks to all who have dealt with this problem so far. Today I noticed that the problem seems to affect all emails that drupal sends.

Now, I am in contact with the provider about the php switch. Maybe something went wrong with the switch!

Kind regards
Waldemar

down2under’s picture

I have had the same problems, when switching to php 8.

I fixed it, when I changed the mail system to Default not HTMLMail under admin/config/system/mailsystem
And inside webform you should not use HTML mail sending

Drupal 7 is not working correctly with php 8 regarding the mail system.

See following other issues:

https://www.drupal.org/project/htmlmail/issues/3318128
https://www.drupal.org/project/drupal/issues/3319062
https://www.drupal.org/project/webform/issues/3319069

iceman2202’s picture

Meanwhile, I created a test environment with drupal 9.4.9 and actual webform module. The result is the same: the german Umlaute are also misrepresented.

Meanwhile, after I faced the hosting provider with both issues I got the answer: There is a problem with the php version and mime. It will solved with next update.

Does anyone know about such circumstances and/or context?

Liam Morland’s picture

Version: 7.x-4.24 » 7.x-4.x-dev

It would be great to get an automated test that would demonstrate this. Then we can clearly see it working on PHP 7 and failing on PHP 8.

iceman2202’s picture

Sorry, but I have no possibility to turn back to php 7. The provider (Hosteurope) provides only php 8.0 and php 8.1.

Therefore here is an example of an email response of drupal 9 webform php 8.0;

Submitted on Sa., 17.12.2022 - 18:50

Submitted by: Anonymous

Submitted values are:

-------- Hundeführer
--------------------------------------------------------

*Vorname*
Hans
*Nachname*
Mustermann
*Adresse*
Teststrasse 11
Stuttgart 7777
*Email Adresse*
w.test@test.de [1]
*Hundeführer=Hundehalter*
Ja
*Telefon*
0170 1111111 [2]
-------- Angaben zum Hund
----------------------------------------------------

*Rufname des Hundes*
Brix
*Zwingername*
Alacantara
*Rasse*
Schäferhund
*Wurftag des Hundes*
So., 02/12/2017 - 00:00
*Geschlecht*
Rüde
*Eigenschaften und Ausbildungsstand des Hundes* sehr aktiv
*Bemerkungen*
ist ein übler Bursche
-------- Einverständnis
-----------------------------------------------------

*Bestätigung*
Ja
*EinverstandenMitglied*
Ja
*Einverstanden*
Ja

[1] mailto:w.test@test.de
[2] tel:0170 1111111

Liam Morland’s picture

This may be related to changes to character encoding configuration rather than the PHP version itself.