View Issue Details

IDProjectCategoryView StatusLast Update
0009309phpList 3 applicationInternationalization (l18n)public26-05-09 13:07
Status resolvedResolutionduplicate 
Product Version2.10.4 
Target VersionFixed in Version 
Summary0009309: Special characters (ä, ö, é, ç, ã etc.) do not display correctly with UTF-8 charset selected
DescriptionA number of users has mentioned that special characters (ä, ö, é, ç, ã etc.) do not display correctly when the charset for text messages is set to UTF-8 on the configuration page. I'm not sure whether or not there's a problem with html messages too.

I can't reproduce the problem, so I suspect the issue is probably only occurring with a specific server configuration settings. Not sure which configuration settings are causing the trouble though.

This fix was suggested in the Portuguese forum, and apparently seems to work in most (if not all) cases: On the configuration page, change the charset from UTF-8 to iso-8859-1 , i.e.:

Admin main page >> configuration:
- Charset for HTML messages: iso-8859-1
- Charset for Text messages: iso-8859-1
Additional InformationThese are references to some of the forum posts mentioning the problem:
TagsNo tags attached.


duplicate of 0001644 resolvedmichiel Subject error with UTF-8 encode in Traditional Chinese 
related to 0002705 closed PHPList v2.11 release 



28-02-07 15:22

reporter   ~0024211

Sending emails with PHPLsit in french, I had problems with accents in text version of emails since fckeditor was introduced. Accents were displayed as their html code. In PHPList forums, I discovered that I had to change "Charset for HTML messages" and "Charset for Text messages" to utf-8 to correct this, and it did, but that introduced a new problem with email subject when having accents in it and all system messages setted in configuration page. So here is how I resolved the whole thing:

After making these changes in configuration page
Charset for HTML messages: utf-8
Charset for Text messages: utf-8

My emails were really sent in utf-8 and accents were correctly displayed in the body (the message in itself) of both text and html emails. That was my footer ("click here to unscribe" (but in french)) and email subject that were not. It's because those last two items are stored in the database in iso8859-1 because PHPList interface is displayed in iso8859-1 by the browser.

First, as someone pointed out, I had to change my french langage file. (/lists/texts/ Not only I had to change to "$strCharSet = 'UTF-8';", but I also had to download the file, encode it in utf-8 (it was iso8859-1) and reupload it. From then, PHPList interface was displayed in utf-8 by the browser, so by that, also characters written in text field inputs.

This lead to the second thing. My database is in iso8859-1. Converting all the data in database (and database structure) in utf-8 changed nothing beacause PHPList continues to connect to DB by thinking that the data is in iso8859-1. So all I did is correct all accents characters in all the fields in the config page (now displayed in utf-8, but since the datat is iso8859-1 it was not correctly shown). So what it means is that my database structure is still in iso8859-1 but filled with utf-8 data, phplist by connecting to DB thinks it's iso8859-1 so it doesn't convert it, and then the browser as being told to show pages in utf-8 then correctly displays all characters.

By now, my emails are composed with fckeditor in the browser in utf-8 and then, when phplist merges the footers and title (now stored in utf-8) with the body then everything is received by my users correctly.

Are my explainations clear ? I hope it will helps someone.

Well, what would be an imrovement to make to PHPList would be to make the interface (language files) and DB (structure and connection) in utf-8. If someone then want to send emails in an other charset, then PHPList should integrate a converting function to do it.


02-09-07 20:45

reporter   ~0031507

I had a similar problem with PHPList in French. I set both charset to iso-8859-1 and I had the following lines of code to nsendemaillib.php

At line 202 (just after $textmessage = $textcontent;)
  if ($cached[$messageid]["text_charset"] != 'UTF-8') {
      $textmessage = iconv("UTF-8", $cached[$messageid]["text_charset"]."//TRANSLIT", $textmessage);

Around line 325: (I added the htmlentities function)

  if (is_array($user_att_values)) {
    foreach ($user_att_values as $att_name => $att_value) {
      if (eregi("\[".htmlentities($att_name)."\]",$htmlmessage,$regs)) {
        # the value may be a multiline textarea field
        $htmlatt_value = str_replace("\n","
        $htmlmessage = eregi_replace("\[".htmlentities($att_name)."\]",$htmlatt_value,$htmlmessage);
      if (eregi("\[".$att_name."\]",$textmessage,$regs)) {
        $textmessage = eregi_replace("\[".$att_name."\]",$att_value,$textmessage);
      # @@@ undocumented, use alternate field for real email to send to
      if (isset($GLOBALS["alternate_email"]) && strtolower($att_name) == strtolower($GLOBALS["alternate_email"])) {
        $destinationemail = $att_value;

I solved, I my case (where pages are displayed as iso-8859-1), both problems with encoding of text messages (which were always encoded in UTF-8) and with accented chars in attributes of html messages (which were converted to hmtl entities before being processed).

I hope it could help other people...


20-03-09 06:33

manager   ~0050566

Might be related to notes 0050558 and 0050565 of