[wp-trac] [WordPress Trac] #63974: .mo file loaded as UTF-8 by default - non-standard and ignoring Content-Type headers

WordPress Trac noreply at wordpress.org
Mon Sep 15 15:18:47 UTC 2025


#63974: .mo file loaded as UTF-8 by default - non-standard and ignoring Content-
Type headers
--------------------------+------------------------------
 Reporter:  kkmuffme      |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  I18N          |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by siliconforks):

 Replying to [comment:7 kkmuffme]:
 > Good point! What do you suggest?

 I don't know - if I were writing a brand new function today to parse `.mo`
 files, I would probably just return `false` if there is no `Content-Type`
 header.  That would effectively force everyone to use a `Content-Type`
 header.  But changing an existing function would break backward
 compatibility and cause problems for anyone currently using `.mo` files
 without `Content-Type`.

 It might be reasonable to add a `_doing_it_wrong()` warning.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/63974#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list