WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 3 years ago

Last modified 3 years ago

#10862 closed defect (bug) (worksforme)

Incorrect encoding for non-ascii symbols in emails

Reported by: 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 5 years ago.
fix patch

Download all attachments as: .zip

Change History (12)

bobrik5 years ago

fix patch

comment:1 bobrik5 years ago

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

comment:2 scribu5 years ago

  • Milestone changed from 2.8.5 to 2.9

comment:3 hakre5 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.

comment:4 hakre5 years ago

Related: #3658

comment:5 bobrik5 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.

comment:6 bobrik5 years ago

  • Keywords reporter-feedback removed

comment:7 dwright4 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

comment:8 dwright4 years ago

  • Keywords reporter-feedback added

comment:9 markjaquith4 years ago

  • Milestone changed from 2.9 to Future Release

comment:10 solarissmoke3 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.

comment:11 nacin3 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.