{"id":123781,"date":"2026-06-10T17:17:22","date_gmt":"2026-06-10T17:17:22","guid":{"rendered":"https:\/\/make.wordpress.org\/core\/?p=123781"},"modified":"2026-06-10T20:06:37","modified_gmt":"2026-06-10T20:06:37","slug":"call-for-testing-unicode-email-addresses","status":"publish","type":"post","link":"https:\/\/make.wordpress.org\/core\/2026\/06\/10\/call-for-testing-unicode-email-addresses\/","title":{"rendered":"Call for Testing: Unicode email addresses."},"content":{"rendered":"<p class=\"wp-block-paragraph\">Last month a call for input was sent concerning the <a href=\"https:\/\/make.wordpress.org\/core\/2026\/05\/22\/extending-unicode-support-in-email-addresses-usernames-and-slugs\/\">introduction of Unicode email addresses<\/a> for WordPress accounts (<a href=\"https:\/\/core.trac.wordpress.org\/ticket\/31992\">#31992<\/a>). Initial support was merged in <a href=\"https:\/\/core.trac.wordpress.org\/changeset\/62482\">[62482]<\/a>. Here is what you need to know in order to test this change on your sites and in your plugins and themes.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>is_email()<\/code> and <code>sanitize_email()<\/code> accept non-ASCII email addresses like <code>gr\u00e5@gr\u00e5.org<\/code> if the site database\u2019s charset is <code>utf8mb4<\/code>.<\/li>\n\n\n\n<li>Support is added as an <span tabindex='0' class='glossary-item-container'>enhancement<span class='glossary-item-hidden-content'><span class='glossary-item-header'>enhancement<\/span> <span class='glossary-item-description'>Enhancements are simple improvements to WordPress, such as the addition of a hook, a new feature, or an improvement to an existing feature.<\/span><\/span><\/span> which can be disabled by removing the <code>is_email<\/code> and <code>sanitize_email<\/code> filters for <code>wp_is_unicode_email<\/code> and <code>wp_sanitize_unicode_email<\/code>, respectively.<\/li>\n\n\n\n<li>A new class \u2014 <code>WP_Email_Address<\/code> \u2014 provides a structural view into email addresses so your code doesn\u2019t have to guess. It provides the local part, the domain part, and decodes Punycode translations in the domain part.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">It should be possible, therefore, to create WordPress accounts with email addresses not previously allowed. In addition, email validation is updated to match the WHATWG email specification so that WordPress and an <code>&lt;input type=email&gt;<\/code> element will agree on what is and what isn\u2019t allowable.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The term \u201cUnicode email address\u201d may be a bit ambiguous because there are two ways emails can be considered <em>Unicode<\/em>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Unicode <em>domain<\/em> support has been supported for many years through <em>Punycode<\/em> encoding of the domain. This is an ASCII-encoded version of Unicode domains where the domain parts start with <code>xn--<\/code>, like <code>xn--uist2j67d64zv30b.xn--ses554g<\/code> as a stand-in for <code>\u6155\u7530\u5cea\u957f\u57ce.\u7f51\u5740<\/code>. Because the encoding is all ASCII, WordPress has implicitly supported Unicode domains without recognizing them. The change in <a href=\"https:\/\/core.trac.wordpress.org\/changeset\/62482\">[62482]<\/a> decodes the domain parts so that WordPress and its plugins and themes can access either the ASCII representation (for circumstances like <span tabindex='0' class='glossary-item-container'>HTML<span class='glossary-item-hidden-content'><span class='glossary-item-header'>HTML<\/span> <span class='glossary-item-description'>HyperText Markup Language. The semantic scripting language primarily used for outputting content in web browsers.<\/span><\/span><\/span> attributes where software will read their value) or the Unicode representation (for circumstances like text nodes where human will read their value).<\/li>\n\n\n\n<li>Unicode <em>local part<\/em> (mailbox) support has largely been absent from specifications and software until recently when most major email hosts started routing mail with UTF-8 mailboxes. WordPress previously rejected all addresses containing non-ASCII characters. It now accepts valid UTF-8 local parts. There has never been an ASCII-encoding of this part of the email address.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">If your extension code expects email addresses to only contain ASCII bytes, they will need updating for WordPress\u2019 new Unicode email support. The easiest way to account for this is to use the new <code><a href=\"https:\/\/github.com\/WordPress\/wordpress-develop\/blob\/2001ef14e6bada1575d2e8b144efff4ce9c01dab\/src\/wp-includes\/class-wp-email-address.php#L207\">WP_Email_Address::from_string()<\/a><\/code> and then access its getter methods.<\/p>\n\n\n\n<pre title=\"\" class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">\/\/ Generate an author link.\n\n$email = WP_Email_Address::from_string( $provided_email );\nif ( null === $email ) {\n    return '';\n}\n\n$processor = new WP_HTML_Tag_Processor( '&lt;a&gt; &lt;\/a&gt;' );\n$processor-&gt;next_tag();\n$processor-&gt;set_attribute( 'href', \"mailto:{$email-&gt;get_ascii_address()}\" );\n$processor-&gt;next_token();\n$processor-&gt;set_modifiable_text( $email-&gt;get_unicode_address() );\nreturn $processor-&gt;get_updated_html();<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If your <strong><span tabindex='0' class='glossary-item-container'>plugin<span class='glossary-item-hidden-content'><span class='glossary-item-header'>Plugin<\/span> <span class='glossary-item-description'>A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory <a href=\"https:\/\/wordpress.org\/plugins\/\">https:\/\/wordpress.org\/plugins\/<\/a> or can be cost-based plugin from a third-party.<\/span><\/span><\/span> connects with a third party service using email addresses from WordPress<\/strong>, now is a good time to ensure that third party also properly supports Unicode email addresses. If not, you can disable Unicode email support with the following snippet.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">\/\/ Disable Unicode email support until third-party integration supports them.\n\nremove_filter( 'is_email', 'wp_is_unicode_email', 10 );\nremove_filter( 'sanitize_email', 'wp_sanitize_unicode_email', 10 );\nadd_filter( 'is_email', 'wp_is_ascii_email', 10, 3 );\nadd_filter( 'sanitize_email', 'wp_sanitize_ascii_email', 10, 3 );<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Thank you!<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">This change updates existing email validation and sanitization code <em>and<\/em> introduces new behaviors for an unbounded set of potential email addresses. It\u2019s likely that unanticipated cases will arise, and with your feedback in these cases, this feature can be a successful part of WordPress 7.1.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Props<\/h3>\n\n\n\n<p class=\"has-text-align-right wp-block-paragraph\">Thanks to <a href=\"https:\/\/profiles.wordpress.org\/amykamala\/\" class=\"mention\"><span class=\"mentions-prefix\">@<\/span>amykamala<\/a> and <a href=\"https:\/\/profiles.wordpress.org\/jorbin\/\" class=\"mention\"><span class=\"mentions-prefix\">@<\/span>jorbin<\/a> for reviewing this post!<\/p>\n<p class=\"o2-appended-tags\"><a href=\"https:\/\/make.wordpress.org\/core\/tag\/call-for-testing\/\" class=\"tag\"><span class=\"tag-prefix\">#<\/span>call-for-testing<\/a>, <a href=\"https:\/\/make.wordpress.org\/core\/tag\/email\/\" class=\"tag\"><span class=\"tag-prefix\">#<\/span>email<\/a>, <a href=\"https:\/\/make.wordpress.org\/core\/tag\/unicode\/\" class=\"tag\"><span class=\"tag-prefix\">#<\/span>unicode<\/a><\/p><nav class='o2-post-footer-actions'><ul class='o2-post-footer-action-row'><li class='o2-post-footer-action'><a href=\"https:\/\/login.wordpress.org\/?redirect_to=https%3A%2F%2Fmake.wordpress.org%2Fcore%2F2026%2F06%2F10%2Fcall-for-testing-unicode-email-addresses%2F%23respond&#038;locale=en_US\" title=\"Login to Reply\"  class=\"genericon  genericon-reply\"  data-action=\"login-to-reply\"  data-actionstate=\"default\" >Login to Reply<\/a><\/li><\/ul><div class='o2-post-footer-action-likes'><\/div><ul class='o2-post-footer-action-row'><\/ul><\/nav>","protected":false},"excerpt":{"rendered":"<p>Last month a call for input was sent concerning the introduction of Unicode email addresses for WordPress accounts (#31992). Initial support was merged in [62482]. Here is what you need to know in order to test this change on your sites and in your plugins and themes. It should be possible, therefore, to create WordPress [&hellip;]<\/p>\n","protected":false},"author":13597958,"featured_media":0,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[1175],"tags":[1404,100,5849],"class_list":["post-123781","post","type-post","status-publish","format-standard","hentry","category-general","tag-call-for-testing","tag-email","tag-unicode","mentions-amykamala","mentions-dmsnell","mentions-example","mentions-gr","mentions-jorbin","mentions-krupajnanda","author-dmsnell"],"revision_note":"","jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p2AvED-wct","_links":{"self":[{"href":"https:\/\/make.wordpress.org\/core\/wp-json\/wp\/v2\/posts\/123781","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/make.wordpress.org\/core\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/make.wordpress.org\/core\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/make.wordpress.org\/core\/wp-json\/wp\/v2\/users\/13597958"}],"replies":[{"embeddable":true,"href":"https:\/\/make.wordpress.org\/core\/wp-json\/wp\/v2\/comments?post=123781"}],"version-history":[{"count":15,"href":"https:\/\/make.wordpress.org\/core\/wp-json\/wp\/v2\/posts\/123781\/revisions"}],"predecessor-version":[{"id":123800,"href":"https:\/\/make.wordpress.org\/core\/wp-json\/wp\/v2\/posts\/123781\/revisions\/123800"}],"wp:attachment":[{"href":"https:\/\/make.wordpress.org\/core\/wp-json\/wp\/v2\/media?parent=123781"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/make.wordpress.org\/core\/wp-json\/wp\/v2\/categories?post=123781"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/make.wordpress.org\/core\/wp-json\/wp\/v2\/tags?post=123781"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}