Hello,
We are building enrollment forms where users frequetly enter accented characters, which is fine until it comes time to email confirmations, etc.
When passing from vortex to sendmail, "hard-coded" accented characters show up fine, but in any variables the accented characters are garbled.
We have tried both emailing directly from the form submission, and writing the values to the database first, then retrieveing them, and sending. (The accented characters get written to the database fine, still look fine when retrieved, but look garbled once passed to sendmail.
--
example where USERNAME contains: àâäèéê
<SQL ROW "SELECT USERNAME FROM REGFORM where id = '4f7d6acd112d'"></SQL>
<send $USERNAME> // Produces: àâäèéê
<sum "%s" 'Prénom: ' $USERNAME>
<$BODY = $ret>
<$TO = 'user@email.com'>
<$FROM = 'user@unhcr.org'>
<$SUBJECT = 'testing'>
<exec BKGND /usr/lib/sendmail -t -n>
From: UNHCR <$FROM>
To: $TO
Subject: $SUBJECT
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
<fmt "%s" $BODY>
</exec>
// Produces: Prénom: ÃâäÃ̈Ã
// NB. (The "hard-coded" accent in "Prénom" shows correctly, but the user-submitted variable is garbled.)
--
Another example where data is used straight from an HTML form:
<form name="reg_form" id="reg_form" action="regsystem" method="post">
<input type="text" name="USERNAME" id="USERNAME" value="àâäèéê" />
<input type="submit" value="Soumettre" />
</form>
- and on the resulting page -
<if $USERNAME neq "">
<send $USERNAME> // Produces: àâäèéê
<sum "%s" 'Prénom: ' $USERNAME>
<$BODY = $ret>
<$TO = 'user@email.com'>
<$FROM = 'user@unhcr.org'>
<$SUBJECT = 'testing'>
<exec BKGND /usr/lib/sendmail -t -n>
From: UNHCR <$FROM>
To: $TO
Subject: $SUBJECT
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
<fmt "%s" $BODY>
</exec>
// Produces: Prénom: ÃâäÃ̈Ã
</if>
--
Any ideas on where we are going wrong? Thanks!
We are building enrollment forms where users frequetly enter accented characters, which is fine until it comes time to email confirmations, etc.
When passing from vortex to sendmail, "hard-coded" accented characters show up fine, but in any variables the accented characters are garbled.
We have tried both emailing directly from the form submission, and writing the values to the database first, then retrieveing them, and sending. (The accented characters get written to the database fine, still look fine when retrieved, but look garbled once passed to sendmail.
--
example where USERNAME contains: àâäèéê
<SQL ROW "SELECT USERNAME FROM REGFORM where id = '4f7d6acd112d'"></SQL>
<send $USERNAME> // Produces: àâäèéê
<sum "%s" 'Prénom: ' $USERNAME>
<$BODY = $ret>
<$TO = 'user@email.com'>
<$FROM = 'user@unhcr.org'>
<$SUBJECT = 'testing'>
<exec BKGND /usr/lib/sendmail -t -n>
From: UNHCR <$FROM>
To: $TO
Subject: $SUBJECT
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
<fmt "%s" $BODY>
</exec>
// Produces: Prénom: ÃâäÃ̈Ã
// NB. (The "hard-coded" accent in "Prénom" shows correctly, but the user-submitted variable is garbled.)
--
Another example where data is used straight from an HTML form:
<form name="reg_form" id="reg_form" action="regsystem" method="post">
<input type="text" name="USERNAME" id="USERNAME" value="àâäèéê" />
<input type="submit" value="Soumettre" />
</form>
- and on the resulting page -
<if $USERNAME neq "">
<send $USERNAME> // Produces: àâäèéê
<sum "%s" 'Prénom: ' $USERNAME>
<$BODY = $ret>
<$TO = 'user@email.com'>
<$FROM = 'user@unhcr.org'>
<$SUBJECT = 'testing'>
<exec BKGND /usr/lib/sendmail -t -n>
From: UNHCR <$FROM>
To: $TO
Subject: $SUBJECT
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
<fmt "%s" $BODY>
</exec>
// Produces: Prénom: ÃâäÃ̈Ã
</if>
--
Any ideas on where we are going wrong? Thanks!