View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0015324 | phpList 3 application | Interface - Frontend | public | 26-08-09 12:27 | 29-04-11 11:42 |
Reporter | lwc | Assigned To | |||
Priority | normal | Severity | major | Reproducibility | sometimes |
Status | resolved | Resolution | fixed | ||
Product Version | 2.10.10 | ||||
Summary | 0015324: Subject and From turn to Gibberish when saved not in English | ||||
Description | This 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> <tr> <td colspan=2> </td></tr> <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> </td></tr>'; // custom code - end | ||||
Additional Information | The "//" in "//value" shows up in the HTML code. See bug report 0015323 | ||||
Tags | No tags attached. | ||||
|
Issue with use of iconv() confirmed in http://forums.phplist.com/viewtopic.php?f=17&t=28038 It seems to me the iconv() function was introduced when trying to fix issue http://mantis.phplist.com/view.php?id=15241 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 http://mantis.phplist.com/view.php?id=1644 |
|
See also http://mantis.phplist.com/view.php?id=15287 |
|
the character encoding issues have been dealt with in the 2.11 versions |