#12390 closed defect (bug) (wontfix)
UTF-8 theme files lead to double Byte Order Mark
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Priority: | low | |
Severity: | normal | Version: | 2.9.2 |
Component: | Charset | Keywords: | close |
Focuses: | Cc: |
Description
At some point I switched my theme's header.php to UTF-8. This has led to WordPress generating pages with the Unicode Byte Order Mark (hex: EF BB BF / ASCII: ) repeated twice: one instance added by the code, correctly, and the other inserted when parsing the header file.
This has come to light thanks to the current Steam beta (http://store.steampowered.com/uiupdate/), in which WebKit plain refuses to load application/xhtml+xml pages with two BOMs.
I can't explain why Chrome and Safari and other browsers don't falter in the same way, but it seems unwise to assume that it's because this "double BOM" behaviour is acceptable. It should be fixed to prevent future problems.
Change History (5)
#2
@
15 years ago
- Resolution set to wontfix
- Status changed from new to closed
I agree with Denis. Don't put BOMs in your PHP files. Problem solved.
#3
@
15 years ago
Assuming you know what a BOM is. I wouldn't argue with "it's too obscure and harmless", but "users should know better" doesn't cut the mustard. Unlike writing a plugin, switching a theme file to UTF8 so you can use non-ASCII characters is not an overtly technical operation.
#4
@
15 years ago
This has come up a few times..
Put a BOM character into your files and you end up with that problem, Its as simple as that.
Even if you dont do it deliberately, what is WordPress supposed to do? Filter the output of all your pages and ensure that its not present?
There is unfortunately, not much that can be done that wont harm performance for others. The benefit is slim.
See #6795 - closed as wontfix