- GetMenuItemText( menu , i , p_name ) ;
- wxString c_name = wxMacMakeStringFromPascal(p_name) ;
+ wxString c_name ;
+#if TARGET_API_MAC_CARBON
+ CFStringRef menutext ;
+ c_name = wxEmptyString ;
+ if ( CopyMenuItemTextAsCFString (menu, i, &menutext) == noErr )
+ {
+ c_name = wxMacCFStringHolder(menutext).AsString(wxLocale::GetSystemEncoding());
+ }
+#else
+ Str255 p_name;
+ GetMenuItemText( menu, i, p_name );
+ c_name = wxMacMakeStringFromPascal( p_name );
+#endif