Κυριακή 1 Αυγούστου 2010

phplist greek encoding problem verion 2.10.12

I installed phplist version 2.10.12 for a newsletter application, but I had some problems with the greek characters. This post may concern not only the greek language, but any other language with utf-8 encoding as well.

Phplist, (for those who have never heard something about it), is a popular open source email campaign manager that is easy to install and intergrate with any website. There is a lot of documentation about it at the following address http://www.phplist.com.

As far as the greek encoding problem is concerned, I give you 2 links that helped me clear things out. 
thingshttp://blog.biznet.gr/2010/03/16/phplist-2-10-10-greek-support-utf-8/
http://mantis.phplist.com/view.php?id=1644 

Here is what made the trick for me:


Configuration page:
After you login to admin, on main page in section "Configuration functions" click configure and change the following:
 - Charset for HTML messages: UTF-8
 - Charset for Text messages: UTF-8


config.php:
 - $language_module = "greek.inc"; ***
 - define("HTMLEMAIL_ENCODING","quoted-printable");
 - define("TEXTEMAIL_ENCODING",'7bit');

***In greek.inc you have to do some changes. Find  lists/texts/greek.inc and change this:

$strCharSet = 'utf-8';

When you save the txt file, you have to choose encoding utf-8.


database encoding
- the database (individual tables + any text columns) should be set to UTF-8
- the PHP-MySQL connection should be set to UTF-8, since it will otherwise default to latin1
You can collect additional server related info by using the following query in phpMyAdmin: SHOW VARIABLES LIKE 'character_set_%'

character_set_client utf8
character_set_connection utf8
character_set_database utf8
character_set_results utf8
character_set_server latin1
character_set_system utf8 


Til this point I had the following:
-The body of the message was fine both at email and admin system of phplist too.
-The subject was not greek neither at the email nor at the admin page.


So I made a change at the following page of phplist:

admin/pagetop.php
- the HTML page's Content-Type should be set to UTF-8 (I hardcoded utf-8)

After this change the subject of the message was greek at the email, but not at the admin system. What solved the problem was changing the charset to utf-8 at admin/phpmailer/class.phplistmailer.php

I hope I helped someone else with this post!

You may also check this post about phplist version 2.10.13.

7 σχόλια:

  1. Thanks it's working great
    Να σαι καλά μόνο εσύ το έχεις γράψει τόσο αναλυτικά

    ΑπάντησηΔιαγραφή
  2. what makes the trick for me for the subject are was
    the change on admin /languages.php
    the greek iso ---- all to UTF-8.
    i am using the 2.10.13 version.
    thanks for your help !!

    ΑπάντησηΔιαγραφή
  3. sorry i meant on page 13
    "en" => array("English ","UTF-8","UTF-8, UTF-8 "),
    and the greek characters showing up on the subject field

    ΑπάντησηΔιαγραφή
  4. Για τον κόσμο που δεν έχει ιδιαίτερες τεχνικές γνώσεις μπορεί να ανοίξει την λίστα ("contact_import".csv) με notepad++ να πάει στο encoding, να την κάνει Convert to UTF8 without BOM, να την αποθηκεύσει χωρίς να πειράξει τίποτα άλλο και να την κάνει ξανά import. Αυτή τη φορά τα ελληνικά ονόματα/επίθετα θα μπουν κανονικά.
    Follow us on : facebook , twitter or directly

    ΑπάντησηΔιαγραφή
  5. σε version 2.10.14 τι ακριβώς χρειάζεται να κάνω?
    Ξέρει κανένας?
    At version 2.10.14 what can i do to solve the same problem?
    Do you know nobody?

    ΑπάντησηΔιαγραφή