Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#22909 closed defect (bug) (worksforme)

Special characters are not displayed properly on the menus

Reported by: varna_city Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.5
Component: Menus Keywords: reporter-feedback
Focuses: Cc:

Description (last modified by SergeyBiryukov)

The previous version of Wordpress 3.4 did handle special characters like ★ and ✄ pretty well. Wordpress 3.4 displays such special characters and they can be used on the Wordpress menus, however in version 3.5, these characters are displayed as empty squares, which does mean that 3.5 can't recognize them properly.

Attachments (1)

special-char-menu.zip (820 bytes) - added by toscho 5 years ago.
Test plugin with non-ASCII characters in menu titles

Download all attachments as: .zip

Change History (13)

#1 @toscho
5 years ago

Empty squares are usually an indicator for a browser issue: your browser cannot find a font on your operating system to render these characters. Check your font list and try another browser.

#2 @toscho
5 years ago

  • Cc info@… added

#3 @varna_city
5 years ago

Hi, I've tested it with different browsers, the problem is the Wordpress system. When I downgraded to Wordpress 3.4 everything is fine again. I think that Wordpress 3.5 is just using a wrong encoding for the menus in contrast to Wordpress 3.4.

Last edited 5 years ago by varna_city (previous) (diff)

#4 @SergeyBiryukov
5 years ago

  • Keywords reporter-feedback added

Could you provide some steps to reproduce the issue?

I've tried adding "★ and ✄" to a menu name and to individual menu item labels, and they still display correctly in 3.5. Tested in Firefox 17.

#5 @SergeyBiryukov
5 years ago

Also, which browser and OS?

#6 @varna_city
5 years ago

I did try to do it on another site and the same issue is present. OS tested: Windows 7 and Windows 8. Browsers: IE9, IE10, Firefox 17.0.1, Opera latest stable, Chrome latest stable, Safari for Windows 5.1.7. A friend of mine with Windows 7 and Firefox 17.0 did open the two sites and got the same issue. Wordress 3.4 is working fine, 3.5 - had a bug into the menus.

#7 @SergeyBiryukov
5 years ago

Steps to reproduce?

5 years ago

Test plugin with non-ASCII characters in menu titles

#8 @toscho
5 years ago

  • Keywords needs-patch removed

My guess: Your plugin is not properly encoded or your OS is lacking the fonts with these characters. The plugin has to be UTF-8 without a BOM. See attached test plugin. Tested in two installations, Win 7 and Cent OS.


 * Plugin Name: Test Non-ASCII Characters In Menus
 * Plugin URI:  http://core.trac.wordpress.org/ticket/22909
 * This file is encoded in UTF-8 without BOM. Do not change that.

add_action( 'admin_menu', 'tnacim_add_menu' );

 * Register menu with a funny title.
 * @wp-hook admin_menu
 * @return  void
function tnacim_add_menu()
		'✂ ✉ ✔✽ ✾ ✿ ❀ ❉ ❤',
		'❦ ☂ ☔ ☎ ☘ ♫ ♻ ⚥',

 * Print menu pages.
 * @return void
function tnacim_callback() {

	$glob = array ();
	foreach ( $GLOBALS as $k => $v )
		is_scalar( $v ) and $glob[ $k ] = $v;

	ksort( $glob );

	print '<h1>' . $GLOBALS['title'] . '</h1>';

	print '<pre>'
		. htmlspecialchars(
			print_r( $glob, TRUE ), ENT_QUOTES, 'utf-8', FALSE
		. '</pre>';

#9 @DrewAPicture
5 years ago

  • Summary changed from Special charters are not displayed properly on the menus to Special characters are not displayed properly on the menus

#10 @SergeyBiryukov
5 years ago

  • Severity changed from critical to normal

#11 @SergeyBiryukov
5 years ago

  • Description modified (diff)

#12 @SergeyBiryukov
5 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from new to closed

Feel free to reopen with the steps to reproduce on a clean install if there's still a problem.

Note: See TracTickets for help on using tickets.