Problem with unicode in header

Swift Mailer is a fantastic library for sending email with php. Discuss this library or ask any questions about it here.

Moderators: Chris Corbyn, General Moderators

Post Reply
zzk
Forum Newbie
Posts: 3
Joined: Tue Mar 03, 2009 4:40 am

Problem with unicode in header

Post by zzk »

Hello, I'm using swift 3.3.2 with php5 on debian linux with unicode locale, smpt on gmail or my own smtp server. All works fine, except that one cyrillic symbol ("и") is replaced with "��" in message header, in message body it looks normal.

This is header, as it shows up in mail client: "востановлен��е пароля" and this is correct header "востановление пароля" .

what can cause this problem ?
HHahn
Forum Commoner
Posts: 43
Joined: Mon Mar 02, 2009 9:16 am
Location: Veldhoven, Netherlands

Re: Problem with unicode in header

Post by HHahn »

Though pretty experienced in othe rmatters, I am a newbee too at SwiftMailer. So I cannot really help you.
But one thing I can say: for those who want to help you, it seems rather helpful if you mention the correct Unicode value for that charachter (the "mirrored 'N'" -- not knowing its value, I cannot reproduce ot here). after all, the guy who answered my questions so far seems to be an Australian, so not likely to know a Cyrillic-written language.
zzk
Forum Newbie
Posts: 3
Joined: Tue Mar 03, 2009 4:40 am

Re: Problem with unicode in header

Post by zzk »

thanks for good idea,the code is 0438
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Re: Problem with unicode in header

Post by Chris Corbyn »

I'm afraid this is a known issue with version 3 that has been fixed in version 4.

The workaround in version 3 is to switch to base64 encoding in the headers like this:

Code: Select all

$message->headers->setEncoding('B');
zzk
Forum Newbie
Posts: 3
Joined: Tue Mar 03, 2009 4:40 am

Re: Problem with unicode in header

Post by zzk »

thanks for workaround Chris
Post Reply