Skip to content

Instantly share code, notes, and snippets.

@miya0001
Last active June 25, 2018 22:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save miya0001/69df7052fdc19b34f7cba0a30492ace4 to your computer and use it in GitHub Desktop.
Save miya0001/69df7052fdc19b34f7cba0a30492ace4 to your computer and use it in GitHub Desktop.
Next generation of multibyte fix for WordPress

The length of the excerpt should be localizable.

We can make it localizable by adding number of the length into .po like following.

msgctxt "excerpt length"
msgid "40"

The length of the comment in dashboard should be localizable.

We can make it localizable by adding number of the length into .po.

The length of the draft in dashboard should be localizable.

We can make it localizable by adding number of the length into .po.

The email encode should be localizable.

I guess we don't need this fix, but we need to open ticket. Because wp-multibyte-patch is changing encode from UTF-8 to ISO-2022-JP.

The file name for uploded file should be localizable.

We can make it localizable by adding flag like should_be_hashed into .po.

The text length for incremental search of link in tinymce should be localizable.

We can make it localizable by adding number of the length into .po.

Italic style should be localizable.

We need to load additional styles for language pack or it should be changed to inline-styles. wp-multibyte-patch is removing the italic, but don't we really need italic?

Charset should be detect correctly for trackback and pingback.

We are not having a problem with the UTF-8. How many WrodPress that are using non UTF-8? I need to dig the code of wp-multibyte-patch.

Wrapper function should be added for PHP's multibyte function.

I guess PHP's multibyte functions like mb_strlen() isn't working for some languages.

Following is an example to handle this problem on WP-CLI.

https://github.com/wp-cli/php-cli-tools/blob/363c75349f5dde561e0b416dd00f7aaa76fa2c27/lib/cli/cli.php#L155-L194

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment