Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Problem with accent in email notifications

  • dgarcia
  • dgarcia's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 4 months ago #114159 by dgarcia
Hi,

I'm trying to send some email notifications (for example reminder) but when I look at the email I sent, I see that accents have strange character codification.



The problem is that the error is random, sometimes works and sometimes not. Can you think any solution? Only happens at spaces and accents. I try to rewrite the HTML code of the notification and still not working.

Can anybody help me?

Thanks in advance.

Cheers,

Daniel
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 4 months ago #114163 by tpartner
Replied by tpartner on topic Problem with accent in email notifications
Can you attach the HTML you are using?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • dgarcia
  • dgarcia's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 4 months ago #114164 by dgarcia
Replied by dgarcia on topic Problem with accent in email notifications
Yes. This is the HTML that I'm using:
Code:
<title></title>
<table cellpadding="0" cellspacing="0" style="border: 10px solid rgb(192, 0, 0); border-collapse: collapse;">
  <tbody>
    <tr>
      <td>
        <span style="font-size: 11px;"><img alt="" src="/upload/templates/catalan/1.jpg" style="width: 680px; height: 133px;" /></span>
        <p style="margin: 30px 0px 0px 40px;">
          <span style="font-family: Arial; font-size: 16px;">Benvolgut/da,</span></p>
        <p style="margin: 20px 0px 0px 40px; text-align: justify;">
          <span style="font-size: 16px;"><span style="font-family: arial, helvetica, sans-serif;">Recentment va ser convidat a participar en <span style="font-weight: bold;">l’Enquesta de Satisfacció dels<br />
          Serveis TIC de la XX</span>.</span></span></p>
        <p style="margin: 20px 0px 0px 40px; text-align: justify;">
          <span style="font-size: 16px;"><span style="font-family: arial, helvetica, sans-serif;">Voldríem recordar-li que l'enquesta encara està disponible, per si desitja</span></span><br />
          <span style="font-size: 16px;"><span style="font-family: arial, helvetica, sans-serif;">participar-hi, fins</span></span><span style="font-size: 16px;"><span style="font-family: arial, helvetica, sans-serif;"> el proper <span style="font-weight: bold;">31 </span><span style="font-weight: bold;">de </span><span style="font-weight: bold;">gener </span><span style="font-weight: bold;">de </span><span style="font-weight: bold;">2014.</span></span></span></p>
        <p style="margin: 20px 0px 0px 40px;">
          <span id="_16.2" style="font-family: Arial; font-size: 16px;">Per <span style="font-family: arial, helvetica, sans-serif;"><span style="font-size: 12pt;">participar-hi, només ha de fer </span><span style="font-size: 12pt;">clic</span></span> <a href="XX/index.php/survey/index/sid/327268/token/{TOKEN}">aquí.</a></span></p>
        <p style="margin: 5px 0px 0px 40px;">
          <span style="font-size: 10px;"><span style="font-family: arial, helvetica, sans-serif;"><strong>(La plataforma de l’enquesta està certificada pels següents navegadors: Internet Explorer, Chrome i Firefox amb sistema operatiu Windows).</strong></span></span></p>
        <p style="margin: 20px 0px 0px 40px; text-align: justify;">
          <span id="_16.2" style="font-family: Arial; font-size: 16px;">Aquest enllaç està vinculat exclusivament al seu correu electrònic, per tant, no</span></p>
        <p style="margin: 0px 0px 0px 40px; text-align: justify;">
          <span id="_16.2" style="font-family: Arial; font-size: 16px;">reenviï </span><span id="_16.2" style="font-family: Arial; font-size: 16px;">el missatge a terceres persones.</span></p>
        <p style="margin: 0px 0px 0px 40px; text-align: justify;">
           </p>
        <p style="margin: 0px 0px 0px 40px; text-align: justify;">
          <span style="font-family: Arial; font-size: 16px;">Recordi: aquesta enquesta és </span><span style="font-family: Arial; font-size: 16px; font-weight: bold;">totalment</span><span style="font-family: Arial; font-size: 16px; font-weight: bold;"> anònima.</span></p>
        <p style="margin: 20px 0px 0px 40px; text-align: justify;">
          <span id="_16.2" style="font-family: Arial; font-size: 16px;">Moltes gràcies per a la seva col·laboració.</span></p>
        <p style="margin: 20px 0px 0px 40px; text-align: justify;">
          <span id="_16.2" style="font-family: Arial; font-size: 16px;">Atentament,</span></p>
        <p style="margin: 20px 0px 0px 40px;">
          <img alt="" height="49" src="/upload/templates/catalan/3.jpg" width="283" /></p>
        <p style="margin: 20px 0px 20px 40px;">
          <span style="font-family: arial, helvetica, sans-serif;"><span style="font-size: 10px;"><span id="_12.6">Aquest correu </span>és informatiu, si us plau no respongui a aquesta adreça de correu electrònic per contactar <span id="_12.6">amb nosaltres.</span></span></span></p>
        <span style="font-size: 11px;"><img alt="" src="/upload/templates/catalan/2.jpg" style="width: 680px; height: 45px;" /></span></td>
    </tr>
  </tbody>
</table>
<p>
   </p>
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 4 months ago #114169 by tpartner
Replied by tpartner on topic Problem with accent in email notifications
Try giving it a charset of UTF-8

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
</head>
 
<body>
<title></title>
<table cellpadding="0" cellspacing="0" style="border: 10px solid rgb(192, 0, 0); border-collapse: collapse;">
  <tbody>
    <tr>
      <td>
        <span style="font-size: 11px;"><img alt="" src="/upload/templates/catalan/1.jpg" style="width: 680px; height: 133px;" /></span>
        <p style="margin: 30px 0px 0px 40px;">
          <span style="font-family: Arial; font-size: 16px;">Benvolgut/da,</span></p>
        <p style="margin: 20px 0px 0px 40px; text-align: justify;">
          <span style="font-size: 16px;"><span style="font-family: arial, helvetica, sans-serif;">Recentment va ser convidat a participar en <span style="font-weight: bold;">l’Enquesta de Satisfacció dels<br />
          Serveis TIC de la XX</span>.</span></span></p>
        <p style="margin: 20px 0px 0px 40px; text-align: justify;">
          <span style="font-size: 16px;"><span style="font-family: arial, helvetica, sans-serif;">Voldríem recordar-li que l'enquesta encara està disponible, per si desitja</span></span><br />
          <span style="font-size: 16px;"><span style="font-family: arial, helvetica, sans-serif;">participar-hi, fins</span></span><span style="font-size: 16px;"><span style="font-family: arial, helvetica, sans-serif;"> el proper <span style="font-weight: bold;">31 </span><span style="font-weight: bold;">de </span><span style="font-weight: bold;">gener </span><span style="font-weight: bold;">de </span><span style="font-weight: bold;">2014.</span></span></span></p>
        <p style="margin: 20px 0px 0px 40px;">
          <span id="_16.2" style="font-family: Arial; font-size: 16px;">Per <span style="font-family: arial, helvetica, sans-serif;"><span style="font-size: 12pt;">participar-hi, només ha de fer </span><span style="font-size: 12pt;">clic</span></span> <a href="XX/index.php/survey/index/sid/327268/token/{TOKEN}">aquí.</a></span></p>
        <p style="margin: 5px 0px 0px 40px;">
          <span style="font-size: 10px;"><span style="font-family: arial, helvetica, sans-serif;"><strong>(La plataforma de l’enquesta està certificada pels següents navegadors: Internet Explorer, Chrome i Firefox amb sistema operatiu Windows).</strong></span></span></p>
        <p style="margin: 20px 0px 0px 40px; text-align: justify;">
          <span id="_16.2" style="font-family: Arial; font-size: 16px;">Aquest enllaç està vinculat exclusivament al seu correu electrònic, per tant, no</span></p>
        <p style="margin: 0px 0px 0px 40px; text-align: justify;">
          <span id="_16.2" style="font-family: Arial; font-size: 16px;">reenviï </span><span id="_16.2" style="font-family: Arial; font-size: 16px;">el missatge a terceres persones.</span></p>
        <p style="margin: 0px 0px 0px 40px; text-align: justify;">
           </p>
        <p style="margin: 0px 0px 0px 40px; text-align: justify;">
          <span style="font-family: Arial; font-size: 16px;">Recordi: aquesta enquesta és </span><span style="font-family: Arial; font-size: 16px; font-weight: bold;">totalment</span><span style="font-family: Arial; font-size: 16px; font-weight: bold;"> anònima.</span></p>
        <p style="margin: 20px 0px 0px 40px; text-align: justify;">
          <span id="_16.2" style="font-family: Arial; font-size: 16px;">Moltes gràcies per a la seva col·laboració.</span></p>
        <p style="margin: 20px 0px 0px 40px; text-align: justify;">
          <span id="_16.2" style="font-family: Arial; font-size: 16px;">Atentament,</span></p>
        <p style="margin: 20px 0px 0px 40px;">
          <img alt="" height="49" src="/upload/templates/catalan/3.jpg" width="283" /></p>
        <p style="margin: 20px 0px 20px 40px;">
          <span style="font-family: arial, helvetica, sans-serif;"><span style="font-size: 10px;"><span id="_12.6">Aquest correu </span>és informatiu, si us plau no respongui a aquesta adreça de correu electrònic per contactar <span id="_12.6">amb nosaltres.</span></span></span></p>
        <span style="font-size: 11px;"><img alt="" src="/upload/templates/catalan/2.jpg" style="width: 680px; height: 45px;" /></span></td>
    </tr>
  </tbody>
</table>
</body>
</html>

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • dgarcia
  • dgarcia's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 4 months ago #114171 by dgarcia
Replied by dgarcia on topic Problem with accent in email notifications
I tried your solution but doesn't work.

Althroug, I try these alternative solution and works. For example, for the word 'Satisfacció':
Code:
Satisfacci&amp;#243;

But this is not perfect solution because the subject of email is 'Enquesta de Satisfacció' and I can't put this code HTML in subject field before sending... and when I see the email everything was correct except subject that it is: Recordatori Enquesta de Satisfacci?

Can anybody help me?

Thans in advance!!

Cheers,


Daniel
The topic has been locked.
  • Mazi
  • Mazi's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
9 years 4 months ago #114202 by Mazi
Which Limesurvey version do you use?

Please test if this works fine at our demo which always runs the latest code.
If you can reproduce the problem there please file a bug report at our bugtracker, thanks!

Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
The topic has been locked.
  • dgarcia
  • dgarcia's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 4 months ago #114205 by dgarcia
Replied by dgarcia on topic Problem with accent in email notifications
I'm using the last version of Limey Survey (2.05+ Build 141020).


Finally, yesterday I resolved this problem.
The problem was in database codification. I followed the steps in the FAQ: manual.limesurvey.org/Installation_FAQ

Specifically:

When I am entering special chars (Chinese, Cyrillic, Greek, Arabic) into my survey, every character is shown as a question mark?

This happens if your database itself is not created to use an UTF-8 charset. This can happen when you have to create the database using a provider administration panel. You can fix this problem by executing the following SQL command on your database (using for example phpMyAdmin)
ALTER DATABASE `<your_database_name>` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
Replace <your_database_name> with the name of your database. You need to do this before installing LimeSurvey.




Thanks for our help!

Cheers,

Daniel
The following user(s) said Thank You: DenisChenu
The topic has been locked.
  • Mazi
  • Mazi's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
9 years 4 months ago #114208 by Mazi
Ahhh, that explains everything.

Thanks for sharing your solution!

Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose