Make WordPress Core

Opened 15 years ago

Closed 14 years ago

Last modified 14 years ago

#10862 closed defect (bug) (worksforme)

Incorrect encoding for non-ascii symbols in emails

Reported by: bobrik's profile bobrik Owned by:
Milestone: Priority: high
Severity: normal Version: 2.8.4
Component: Mail Keywords:
Focuses: Cc:

Description

WordPress uses iso-8859-1 as email codepage. It's better to use UTF-8 instead. No changes for ascii users but so many profit for other world :)

There's no any good way to hack around incorrect encoding now, so very annoying problem. Must be fixed in the next release.

Patch included. You may use it or make PHPMailer $CharSet var static to make it possible to change it by plugin or any other way.

Attachments (1)

wp-mail-charset-fix.diff (425 bytes) - added by bobrik 15 years ago.
fix patch

Download all attachments as: .zip

Change History (12)

@bobrik
15 years ago

fix patch

#1 @bobrik
15 years ago

  • Summary changed from Incorrect incoding for non-ascii symbols in emails to Incorrect encoding for non-ascii symbols in emails

#2 @scribu
15 years ago

  • Milestone changed from 2.8.5 to 2.9

#3 @hakre
15 years ago

  • Component changed from Charset to Mail
  • Keywords needs-patch reporter-feedback added; has-patch codepage phpmailer mail removed
  • Owner hakre deleted
  • Version changed from 2.9 to 2.8.4

Just asking: bobrik how can you say for shure WordPress uses iso-8859-1 as email codepage? Did you find a definition / documnetation of that somewhere? I would love to know more, because I remember a similar ticket.

Your patch modifies the phpmailer classes which is bad practise. Please find the location in the code where it's instances need to be configured. Next to this, there isn't any chance to update the PHP4 version of the phpmailer class any longer because the current project leader closed that branch.

So -1 for the current patch from my side.

#4 @hakre
15 years ago

Related: #3658

#5 @bobrik
15 years ago

  • Cc bobrik added

Any plugin can use that class so default codepage must be ok for most cases.

How long changing class defaults to correct values became a bad practise? Or it's better to set that value for every object?

I don't see any troubles with that.

#6 @bobrik
15 years ago

  • Keywords reporter-feedback removed

#7 @dwright
15 years ago

  • Cc david_v_wright@… added

Can you show how this manifests itself?

Can you provide an example of what you want to happen and what happens instead?

i.e.

when new users register, an email is sent from wordpress with the contents "XYZ hasło 슰°"

what is being received is garbled text,... etc

#8 @dwright
15 years ago

  • Keywords reporter-feedback added

#9 @markjaquith
15 years ago

  • Milestone changed from 2.9 to Future Release

#10 @solarissmoke
14 years ago

  • Keywords needs-patch reporter-feedback removed
  • Resolution set to worksforme
  • Severity changed from major to normal
  • Status changed from new to closed

Works for me - emails are encoded in UTF-8 and non-ASCII characters aren't garbled. If it's still an issue please reopen with steps to reproduce.

#11 @nacin
14 years ago

  • Milestone Future Release deleted

It should be noted we set the charset in wp_mail() to whatever the blog's charset is.

Note: See TracTickets for help on using tickets.