Opened 17 years ago
Closed 17 years ago
#6788 closed defect (bug) (fixed)
wp-mail.php utf8 (umlauts)
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 2.7 | Priority: | normal |
Severity: | blocker | Version: | 2.5 |
Component: | General | Keywords: | utf8, wp-mail.php, deutsch, umlaut, has-patch, needs-testing |
Focuses: | Cc: |
Description
Wordpress version 2.5 wp-mail.php trims post-by-email content body at german umlauts. We can fix this by adding utf8_decode to wp-mail.php
Line 154
$content = utf8_encode($content);
That's all, folks.
Attachments (3)
Change History (18)
#2
@
17 years ago
A more general solution would be nicer, this one only works for ISO-8859-1 to UTF-8 conversion.
Most German Email programs use ISO-8859-1 by default, but since Wordpress does not have only have German users...
You proposed patch would break if UTF-8 encoding was used, for example.
I will try to find a nice, general solution using the iconv-Library.
For the subject I have done it by now:
Line 64:
old:
$subject = wp_iso_descrambler($subject);
new:
$subject = iconv_mime_decode($subject,2,'utf8');
(why reinvent the wheel?) - works like a charm with utf8 AND ISO-8859-1 subjects.
I will come back later and try to present a solution for the email body.
#5
@
17 years ago
Laenny's patch works fine if we also decode the body content. To do this add:
Line 76
$content = quoted_printable_decode($content);
#6
@
17 years ago
Why is this moved time and time again? The Swedish community starting to get annoyed by this. Should be patched for 2.7. This is an easy one to patch!
#10
follow-up:
↓ 11
@
17 years ago
- Cc westi added
- Milestone changed from 2.7 to 2.8
Moved to 2.8 for now.
Patch very welcome but we need to ensure we cope with all mail encodings and don't break different ones instead.
#11
in reply to:
↑ 10
@
17 years ago
Replying to westi:
Moved to 2.8 for now.
Patch very welcome but we need to ensure we cope with all mail encodings and don't break different ones instead.
You have to be freaking kidding med >:
Problem:
Wordpress version 2.5 wp-mail.php cuts off subjects and content containing german umlauts.
Solution:
We can fix this by adding utf8_decode to wp-mail.php
Add this code:
Line 65
$subject = utf8_encode($subject);
Line 154
$content = utf8_encode($content);
Status:
a FORUM entry has been made here http://wordpress.org/support/topic/170583