PHAHONYOTHIN.COM

กูรู => เครือข่าย => ข้อความที่เริ่มโดย: nattasan ที่ สิงหาคม 29, 2014, 12:15:13 pm

หัวข้อ: phpList encoding problem UTF-8 (เพื่อภาษาไทยครับ)
เริ่มหัวข้อโดย: nattasan ที่ สิงหาคม 29, 2014, 12:15:13 pm
Configuration page:
หลังจากล๊อกอิน(login)เข้าหน้า admin, ที่หน้า main page ในส่วน “Configuration functions”

คลิ๊ก configure และเปลี่ยนแปลงค่าตามรายละเอียดด้านล่างครับ:
- Charset for HTML messages: UTF-8
- Charset for Text messages: UTF-8

config.php:
- $language_module = “English.inc”; ***
- define(“HTMLEMAIL_ENCODING”,”quoted-printable”);
- define(“TEXTEMAIL_ENCODING”,’7bit’);

***ที่ English.inc ต้องเปลี่ยนค่าข้างในด้วยโดยหา file ที่ path ตามนี้ lists/texts/English.inc และเปลี่ยนรายละเอียดตามด้านล่างครับ:

$strCharSet = ‘utf-8?;

ตอน save file txt file, ต้องเลือกเป็น encoding ด้วย utf-8 ด้วยครับ.

database encoding
- database (แต่ละ tables + text columns ต่างๆ) ควรจะเลือกเป็น UTF-8 ด้วยครับ
- PHP-MySQL connection ควรจะเลือกเป็น UTF-8 ตามรายละเอียดด้านล่างด้วยครับ

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

แล้วเปลี่ยนแปลงรายละเอียดตามหน้าต่างๆของ phpList ตามรายละเอียดด้านล่างครับ:

admin/pagetop.php
- the HTML page’s Content-Type should be set to UTF-8

ตัวอย่างครับ

แล้วเปลี่ยน var $CharSet ตาม path ด้านล่างเป็น UTF-8 ด้วยครับ

admin/phpmailer/class.phplistmailer.php

/** * Sets the CharSet of the message. * @var string */

var $CharSet = “UTF-8?;