#25012 closed enhancement (fixed)
Add UTF-8 charset to load-styles output
Reported by: | iamfriendly | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 3.9 | Priority: | normal |
Severity: | normal | Version: | 3.6 |
Component: | Formatting | Keywords: | has-patch |
Focuses: | Cc: |
Description
I'm not entirely certain I understand why, but every now and again I come across a setup which - intermittently - causes the admin to display incredibly poorly. I'm pretty sure it's down to js/css concatenation - something way above my paygrade. However, I have just come across one particular environment where, rather than using the CONCATENATE_SCRIPTS constant as I normally do, I thought I'd investigate a little further.
My very first attempt was to explicitly set the charset for the load-styles.php to UTF-8 and this - for whatever reason - actually "solved" the issue on this particular environment. I don't think it would actually cause any grief elsewhere, so thought on the off-chance that it may help others, I'd send a patch.
Attachments (2)
Change History (11)
#4
@
11 years ago
I wonder if it should be get_bloginfo( 'charset' )
actually makes sense. We're not dealing with content here — since we know that our core CSS and JS is UTF-8, I wonder whether we should force UTF-8.
#5
@
11 years ago
Strange that, nacin, I actually had that in place just before I sent over the patch. My thoughts were that it might be that at some point in the future others may want to have non-UTF-8 css/js and having get_bloginfo( 'charset' )
would allow them to do that without any further modifications. I see your point, though - at the moment, that simply isn't possible and so why should we account for it.
Should I make another patch with UTF-8 enforced?
#6
@
11 years ago
- Keywords needs-patch added; has-patch removed
- Milestone changed from Awaiting Review to 3.9
I think forcing this to UTF-8 (for both load-styles and load-scripts) makes sense.
#7
@
11 years ago
- Keywords has-patch added; needs-patch removed
load-scripts already forces UTF-8, so I added a patch for load-styles to force the charset to UTF-8
#8
@
11 years ago
- Owner set to SergeyBiryukov
- Resolution set to fixed
- Status changed from new to closed
In 27253:
Added charset to load-styles.php