Make WordPress Core

Opened 17 years ago

Closed 15 years ago

Last modified 15 years ago

#10862 closed defect (bug) (worksforme)

Incorrect encoding for non-ascii symbols in emails

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

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 17 years ago.
fix patch

Download all attachments as: .zip

Change History (12)

@bobrik
17 years ago

fix patch

#1 @bobrik
17 years ago

  • Summary Incorrect incoding for non-ascii symbols in emailsIncorrect encoding for non-ascii symbols in emails

#2 @scribu
17 years ago

  • Milestone 2.8.52.9

#3 @hakre
17 years ago

  • Component CharsetMail
  • Keywords needs-patch reporter-feedback added; has-patch codepage phpmailer mail removed
  • Owner hakre removed
  • Version 2.92.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
17 years ago

Related: #3658

#5 @bobrik
17 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
17 years ago

  • Keywords reporter-feedback removed

#7 @dwright
17 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
17 years ago

  • Keywords reporter-feedback added

#9 @markjaquith
17 years ago

  • Milestone 2.9Future Release

#10 @solarissmoke
15 years ago

  • Keywords needs-patch reporter-feedback removed
  • Resolutionworksforme
  • Severity majornormal
  • Status newclosed

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
15 years ago

  • Milestone Future Release

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.