r=mkaply, sr=blizzard
OS/2 only - code from jblanco to fix codepage mapping issues in migrating bookmarks
This commit is contained in:
mkaply%us.ibm.com 2001-07-04 04:42:51 +00:00
Родитель a713e052fd
Коммит e60d8707f2
1 изменённых файлов: 16 добавлений и 2 удалений

Просмотреть файл

@ -100,11 +100,25 @@ nsOS2Charset::~nsOS2Charset()
NS_IMETHODIMP
nsOS2Charset::GetCharset(nsPlatformCharsetSel selector, nsString& oResult)
{
oResult = mCharset;
if (selector == kPlatformCharsetSel_4xBookmarkFile) {
if ((mCharset.Find("IBM850", IGNORE_CASE) != -1) || (mCharset.Find("IBM437", IGNORE_CASE) != -1))
oResult.AssignWithConversion("ISO-8859-1");
else if (mCharset.Find("IBM852", IGNORE_CASE) != -1)
oResult.AssignWithConversion("windows-1250");
else if ((mCharset.Find("IBM855", IGNORE_CASE) != -1) || (mCharset.Find("IBM866", IGNORE_CASE) != -1))
oResult.AssignWithConversion("windows-1251");
else if ((mCharset.Find("IBM869", IGNORE_CASE) != -1) || (mCharset.Find("IBM813", IGNORE_CASE) != -1))
oResult.AssignWithConversion("windows-1253");
else if (mCharset.Find("IBM857", IGNORE_CASE) != -1)
oResult.AssignWithConversion("windows-1254");
else
oResult = mCharset;
} else {
oResult = mCharset;
}
return NS_OK;
}
class nsOS2CharsetFactory : public nsIFactory {
NS_DECL_ISUPPORTS