2264 |
item_name[255] = 0; |
item_name[255] = 0; |
2265 |
#if TARGET_API_MAC_CARBON |
#if TARGET_API_MAC_CARBON |
2266 |
{ |
{ |
2267 |
CFStringRef string = |
CFStringRef string = cfstring_create_with_utf8_cstring (item_name); |
|
CFStringCreateWithCString (NULL, item_name, kCFStringEncodingUTF8); |
|
2268 |
|
|
|
if (string == NULL) |
|
|
{ |
|
|
/* Failed to interpret as UTF8. Fall back to Mac Roman. |
|
|
Maybe wv->name is corrupted? */ |
|
|
string = CFStringCreateWithCString (NULL, item_name, |
|
|
kCFStringEncodingMacRoman); |
|
|
} |
|
|
|
|
2269 |
SetMenuItemTextWithCFString (menu, pos, string); |
SetMenuItemTextWithCFString (menu, pos, string); |
2270 |
CFRelease (string); |
CFRelease (string); |
2271 |
} |
} |