Version 3 solves all the utf8 encoding problems?

Questions about Version 3 phpList features (the answer is probably 'Yes!')
Forum rules
Please help the volunteers to help you by supplying the version of phpList you are using, browser & version and if possible, a link to your phpList installation.

Version 3 solves all the utf8 encoding problems?

Postby Mister Paul » 7:37am, Tue 03 Sep, 2013

Hi,

I have now too many encoding problems with version 2.10.19
I posted a thread here:
http://forums.phplist.com/viewtopic.php?f=24&t=39536&p=97004#p97004

I am wondering if a new install from scratch would be the solution...
But does version 3 solves all the phplist utf8 encoding problems?

Thanks
Paul
Mister Paul
PL Geek
 
Posts: 88
Joined: 1:25pm, Tue 19 Feb, 2008

Re: Version 3 solves all the utf8 encoding problems?

Postby duncanc » 10:24am, Tue 03 Sep, 2013

With phplist 3.0.2 a quick test of a new message with the subject and body both containing accented French characters and then Hungarian characters seems to show the characters correctly.

ScreenShot007.gif
ScreenShot007.gif (7.13 KiB) Viewed 3718 times

ScreenShot008.gif
ScreenShot008.gif (2.87 KiB) Viewed 3718 times
duncanc
Moderator
 
Posts: 2440
Joined: 6:34am, Sat 08 May, 2010
Location: London

Re: Version 3 solves all the utf8 encoding problems?

Postby Sven2157 » 1:47pm, Tue 03 Sep, 2013

When you upgrade from v2, there will be a 'convert to utf-8' button, in the admin section. I could swear that there is an additional option in v2, that you need to change, to also ensure utf-8; I can't remember where I saw it though.

Sven2157
Sven2157
PL Master
 
Posts: 170
Joined: 12:18pm, Fri 07 Jun, 2013

Re: Version 3 solves all the utf8 encoding problems?

Postby kerberos » 9:17pm, Wed 04 Sep, 2013

I upgraded to version 3 this past weekend, and extended characters (such as curly quotes) in new messages created automatically by a custom PHP script (writing directly into the message column of a repeated and queued message via mysql_query) are now garbled into â€æ etc.

If I manually copy that message text out of the database, clean it up in a text editor, and paste it back in, it's fine.

As far as I can tell, that table and particularly that column are set to character set utf8 and collation utf_general_ci.

For now, I will have my PHP script convert to html entities before writing the message to the database, but there must be something I can do to fix this.
kerberos
PL Geek
 
Posts: 67
Joined: 9:54pm, Tue 12 Sep, 2006

Re: Version 3 solves all the utf8 encoding problems?

Postby Sven2157 » 10:08pm, Wed 04 Sep, 2013

You can try this ...
Sven2157 wrote:Hey Paul,

I did get the email, you should have too. I go your PM. The characters all look right to me. However, before I post the email results, check out this thread I just found:
MySQL - Convert latin1 characters on a UTF8 table into UTF8

StackOverflow.com wrote:From what you describe, it seems you have UTF-8 data that was originally stored as Latin-1 and then not converted correctly to UTF-8. The data is recoverable; you'll need a MySQL function like
Code: Select all
convert(cast(convert(name using  latin1) as binary) using utf8)

It's possible that you may need to omit the inner conversion, depending on how the data was altered during the encoding conversion.


See if running that does the trick. If you have any questions - post them. :wink:

Sven2157


Sven2157
Sven2157
PL Master
 
Posts: 170
Joined: 12:18pm, Fri 07 Jun, 2013

Re: Version 3 solves all the utf8 encoding problems?

Postby kerberos » 2:10pm, Thu 05 Sep, 2013

Many thanks, Sven 2157. My knowledge of coding is almost entirely "as needed", and this has added a couple more aspects.

Turns out my PHP internal character coding is ISO-8859-1 and MySQL character set latin1 (the same, I think). I have added
Code: Select all
mb_internal_encoding("UTF-8");
at the start of the PHP script and
Code: Select all
mysql_set_charset("utf8",$link);
before making the mysql_query's.

Today's message has already gone out, so tomorrow will be the test.

Update: Test successful! Thanks again.
kerberos
PL Geek
 
Posts: 67
Joined: 9:54pm, Tue 12 Sep, 2006

Re: Version 3 solves all the utf8 encoding problems?

Postby Sven2157 » 4:40pm, Fri 06 Sep, 2013

kerberos wrote:Many thanks, Sven 2157.
Update: Test successful! Thanks again.

You got it, dude! 8)

Sven2157
Sven2157
PL Master
 
Posts: 170
Joined: 12:18pm, Fri 07 Jun, 2013


Return to Does phpList do this?

Who is online

Users browsing this forum: No registered users and 0 guests