Subversion Repositories Kolibri OS

Rev

Rev 4534 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4534 Rev 5690
Line 50... Line 50...
50
}
50
}
Line 51... Line 51...
51
 
51
 
52
void ConvertToDOS(dword inbuf, searchin)
52
void ConvertToDOS(dword inbuf, searchin)
53
{
53
{
54
	dword dos_buf=0;
-
 
55
	if (use_iconv==1)
-
 
56
	{
54
	dword dos_buf=0;
57
		cur_charset = CH_CP866;
55
	cur_charset = CH_CP866;
58
		if (strstri(searchin, "windows-1251")!=0) || (strstri(searchin, "windows1251")!=0) 
56
	if (strstri(searchin, "windows-1251")!=0) || (strstri(searchin, "windows1251")!=0) 
59
			{ dos_buf = ChangeCharset("CP1251", "CP866", inbuf);    cur_charset = CH_CP1251;}
57
		{ dos_buf = ChangeCharset("CP1251", "CP866", inbuf);    cur_charset = CH_CP1251;}
60
		else if (strstri(searchin, "koi8-")!=0)
58
	else if (strstri(searchin, "koi8-")!=0)
Line 64... Line 62...
64
		else if (strstri(searchin, "iso8859-5")!=0) || (strstri(searchin, "iso-8859-5")!=0)
62
	else if (strstri(searchin, "iso8859-5")!=0) || (strstri(searchin, "iso-8859-5")!=0)
65
			{ dos_buf = ChangeCharset("ISO8859-5", "CP866", inbuf); cur_charset = CH_ISO8859_5;}
63
		{ dos_buf = ChangeCharset("ISO8859-5", "CP866", inbuf); cur_charset = CH_ISO8859_5;}
66
		else if (strstri(searchin, "windows-1252")!=0) || (strstri(searchin, "windows1252")!=0) 
64
	else if (strstri(searchin, "windows-1252")!=0) || (strstri(searchin, "windows1252")!=0) 
67
			{ dos_buf = ChangeCharset("CP1252", "CP866", inbuf);    cur_charset = CH_CP1252;}
65
		{ dos_buf = ChangeCharset("CP1252", "CP866", inbuf);    cur_charset = CH_CP1252;}
68
	}
66
}
69
	else
-
 
70
	{
-
 
71
		if (strstri(searchin, "windows-1251")!=0) wintodos( inbuf); else
-
 
72
		if (strstri(searchin, "koi8-")!=0)        koitodos( inbuf); else
-
 
73
		if (strstri(searchin, "utf-8")!=0)        utf8rutodos( inbuf);
-
 
74
	}
-
 
75
}
-
 
Line 76... Line 67...
76
 
67
 
77
 
68
 
78
dword CopyBetweenOffsets(dword start, end) //do not forget to free(line) after use
69
dword CopyBetweenOffsets(dword start, end) //do not forget to free(line) after use