We can not figure out why two almost identical emails are differently rendered.
- One contains proper rendering of Polish characters:
In the Gmail source code, we can see:
U=C5=BCyj linku poni=C5=BCej by zaakceptowa=C4=87 umow=C4=99 powie= rzenia danych osobowych
- Another contains incorrect rendering of Polish characters:
In the Gmail source code, we can see:
U=EF=BF=BD=EF=BF=BDyj linku poni=EF=BF=BD=EF=BF=BDej by zaakceptow= a=EF=BF=BD=EF=BF=BD umow=EF=BF=BD=EF=BF=BD powierzenia danych osobowych
Encoding in both cases is defined as:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
From terminal, we can see that all the emails templates for command:
$ file -bi *.html
are returning:
text/html; charset=utf-8
What are we missing here?


For some reason, saving file again in Intellij IDE, rebuilding WAR file and deploying it on production solved this issue.