Relationship Graph View Issue Dependency Graph
related to child of duplicate of

View Issue Details

IDProjectCategoryView StatusLast Update
0015324phpList 3 applicationInterface - Frontendpublic29-04-11 12:42
Status resolvedResolutionfixed 
Product Version2.10.10 
Target VersionFixed in Version 
Summary0015324: Subject and From turn to Gibberish when saved not in English
DescriptionThis is how the subject of this bug report should be phrased. Please direct all the specific bug reports (e.g. "subject doesn't work in my language" that won't consider other people) in here.

The problem is in public_html/lists/admin/send_core.php:

    iconv('ISO-8859-1','UTF-8',$subject) and htmlentities(iconv('ISO-8859-1','UTF-8',$from) - those statements assume one uses ISO-8859-1, which is why you only get bug reports from people using other languages...

Note those statements were only added in recent versions. For example, v2.10.7 didn't have them and thus had no problems.

Here's the fix:

// custom code - start
  $utf8_subject = $subject;
  $utf8_from = $from;
  if (strcasecmp($GLOBALS['strCharSet'], 'utf-8') <> 0) {
     $utf8_subject = iconv($GLOBALS['strCharSet'],'UTF-8',$utf8_subject);
     $utf8_from = iconv($GLOBALS['strCharSet'],'UTF-8',$utf8_from);

  $maincontent .= '
  <tr><td>'.Help("subject").' '.$GLOBALS['I18N']->get("Subject").':</td>
    <td><input type=text name="msgsubject"
    //value="'.htmlentities($utf8_subject,ENT_QUOTES,'UTF-8').'" size=40></td></tr>
    <td colspan=2>
  <tr><td>'.Help("from").' '.$GLOBALS['I18N']->get("fromline").':</td>
    <td><input type=text name=from
    value="'.htmlentities($utf8_from,ENT_QUOTES,'UTF-8').'" size=40></td></tr>
  <tr><td colspan=2>

// custom code - end
Additional InformationThe "//" in "//value" shows up in the HTML code. See bug report 0015323
TagsNo tags attached.



28-08-09 05:28

manager   ~0050719

Issue with use of iconv() confirmed in

It seems to me the iconv() function was introduced when trying to fix issue

Charset hardcoding should be avoided, IMO. Configurable charset encoding would make the system much more flexible and help avoid all sorts encoding incompatibilities.
See also


29-08-09 14:34

manager   ~0050725

See also


29-04-11 12:42

manager   ~0051195

the character encoding issues have been dealt with in the 2.11 versions