Bug 417264 ? Bookmarks with Japanese characters are not imported from Safari (r=mano)

This commit is contained in:
dietrich@mozilla.com 2008-03-28 11:10:18 -07:00
parent c2a615ee4e
commit 31a769edba

View File

@ -1022,15 +1022,16 @@ nsSafariProfileMigrator::ParseBookmarksFolder(CFArrayRef aChildren,
// Encountered a Bookmark, so add it to the current folder...
CFDictionaryRef URIDictionary = (CFDictionaryRef)
::CFDictionaryGetValue(entry, CFSTR("URIDictionary"));
nsCAutoString title, url;
if (GetDictionaryCStringValue(URIDictionary, CFSTR("title"), title, kCFStringEncodingUTF8) &&
nsAutoString title;
nsCAutoString url;
if (GetDictionaryStringValue(URIDictionary, CFSTR("title"), title) &&
GetDictionaryCStringValue(entry, CFSTR("URLString"), url, kCFStringEncodingUTF8)) {
nsCOMPtr<nsIURI> uri;
PRInt64 id;
rv |= NS_NewURI(getter_AddRefs(uri), url);
PRInt64 id;
rv |= aBookmarksService->InsertBookmark(aParentFolder, uri,
nsINavBookmarksService::DEFAULT_INDEX,
title, &id);
NS_ConvertUTF16toUTF8(title), &id);
}
}
}