php – Do not allow latin characters in the WordPress registry

There is a plugin for WordPress to enable usernames with special characters (Russian, Cyrillic, Arabic, etc.). Unfortunately, this plugin did not work for me.
Here is the function defined to register users in the topic I'm using (QAEngine topic)

public function register () {
$ param = $ _REQUEST['content'];
$ args = array (
& # 39; # 39 & user_email; => $ param['email'],
& # 39; # 39 & user_pass; => $ param['password'],
& # 39; # 39 & user_login; => $ param['username'],
& # 39; # 39 & display_name; => isset ($ param['display_name']) $ param['display_name'] : $ param['username']
    );
$ captcha = isset ($ _ REQUEST['captcha']) $ _REQUEST['captcha'] : & # 39; & # 39 ;;
// validate here later
To attempt {

// check Captcha
ae_verify_captcha ($ captcha, __ (& # 39; Please enter a valid captcha! & # 39 ;, ET_DOMAIN));

$ role = apply_filters (& # 39; qa_custom_role & # 39 ;, & # 39; author & # 39;);
do_action (<je_before_user_register> #, $ args);

// advertise, register and register the user
$ auto_sign = ae_get_option (& # 39; user_confirm & # 39;)? False right;
$ user_id = et_register ($ args, $ role, $ auto_sign);

if (is_wp_error ($ user_id)) {
throw a new exception ($ user_id-> get_error_message (), 401);
}

$ data = get_userdata ($ user_id);
$ userdata = QA_Member :: convert ($ data);
// create new nonces
$ msg = ae_get_option (& # 39; user_confirm & # 39;)? __ ("You have successfully registered an account, but can not join the discussions yet, please confirm your email address first. & # 39 ;, ET_DOMAIN): __ (& # 39; you are registered and successfully signed in.) & # 39 ;, ET_DOMAIN);
$ response = Array (
& # 39; success & # 39; => true,
& # 39; code & # 39; => 200,
& # 39; msg & # 39; => $ msg,
& # 39; data & # 39; => $ userdata,
& # 39; redirect & # 39; => apply_filters (& # 39; qa_filter_redirect_link_after_register & # 39 ;, home_url ())
);

} catch (exception $ e) {
$ response = Array (
& # 39; success & # 39; => wrong,
& # 39; code & # 39; => $ e-> getCode (),
& # 39; msg & # 39; => $ e-> getMessage ()
);
}
wp_send_json ($ response);
}

Here is a full PHP file that declares this function.

Is there a recommendation as to how non-Latin characters are allowed in usernames?