Forums

Character Set Issue with incoming email?

bslayter 27 Sep, 2010
Everything looks great on the server.
But when it hits our lotus notes server, a pretty form turns into:

Below is the result of your feedback form.  It was submitted [email]byrobbass@getsdown.com[/email] on day, month, year, time.----------------------------------------------------------------------email  :  [email]robbass@getsdown.comSOURCE[/email]  :  iwannarockrightnowFIRSTNAME  :  RobLASTNAME  :  BassCOMPANY  : Internationally Known, IncPHONE  :  555-555-1212LOCATION  :  Las Vegas, NVCOMMENTS  :  afdasfd
Submitted by XXX.XXX.XXX.XXX

Gmail is a bit better, but it strips out all the cr/lf's:
Below is the result of your feedback form. It was submitted [email]byrobbass@getsdown.com[/email] on day, month, year, time.----------------------------------------------------------------------email : [email]robbass@getsdown.comSOURCE[/email] : iwannarockrightnowFIRSTNAME : RobLASTNAME : BassCOMPANY : Internationally Known, IncPHONE : 555-555-1212LOCATION : Las Vegas, NVCOMMENTS : afdasfd

Is there somewhere in the code that I can set the language? Any idea what's going on here?
GreyHead 28 Sep, 2010
Hi bslayter,

It's a long time since I used Lotus notes and I never was too fond of it.

There's something odd with character sets here - and specifically with the new-line/carriage return . I think that ChronoForms either defines UTF-8 (or nothing at all).

You could try running the textarea result through the PHP nl2br function in the OnSubmit Before box:
<?php
$text_arae = JRequest::getString('text_area', '', 'post');
if ( $text_area ){
  $text_area = nl2br($text_area);
  JRequest::setVar('text_area', $text_area);
}
?>
where 'text_area' needs to be replaced by the name of your textarea.

Bob
This topic is locked and no more replies can be posted.