[wp-polyglots] Common Mistakes

Morgan Doocy morgan at doocy.net
Tue Mar 8 02:51:59 GMT 2005


On Mar 7, 2005, at 8:29 AM, K Suominen wrote:
> This is one of the topics that keep going around in my head...
>
> I think the gettext interface in WP should convert the messages to the
> character set that has been entered in the Reading Options page.  This
> would allow the mo file to be in UTF-8 (it would *have* to be in a
> known charset).
[…]
> PHP has iconv, hasn't it?  I'd like to look into how this could be
> implemented, when I have some more time.

For some reason I feel like this was discussed before on this 
list...maybe I'm just imagining things. This would be an awesome way to 
do things, provided it doesn't introduce a performance hit. We could 
completely eliminate everything but UTF-8 in the repository! :-)

> Does the admin interface hard-code UTF-8?  I haven't checked.  It
> works well with entities, which might be why I haven't noticed.

The admin interface really just ends up using whatever encoding the 
script file is saved in, so all special characters I've seen in the WP 
core use entities.

> There's a problem with entities, too:  the email that goes out is
> labeled as text/plain, so entities don't get translated.  I actually
> like plain text email, although some of the URL's are a bit long.

This is a good catch.

> The mail messages are also sent out with the charset selected for the
> blog, which means the messages need to match.  An automatic conversion
> in gettext would fix that, too.

Well, that pretty much sells me on it. If I get time I might try to 
hack this into the core and see if it's feasible.

Morgan


More information about the wp-polyglots mailing list