--- charsys.c.orig	2005-07-14 20:23:25.000000000 +0300
+++ charsys.c	2005-07-14 21:04:51.000000000 +0300
@@ -90,6 +90,8 @@
 
 /* MUST be alphabetized (first column) */
 static LangList langlist[] = {
+/* We have to indicate "rus" instead of "blr" below to prevent linking problems while upgrading the network */
+	{ "belarussian-w1251", "rus", LANGAV_ASCII|LANGAV_W1251 },
 	{ "catalan",      "cat", LANGAV_ASCII|LANGAV_LATIN1 },
 	{ "chinese",      "chi-s,chi-t,chi-j", LANGAV_GBK },
 	{ "chinese-simp", "chi-s", LANGAV_GBK },
@@ -117,7 +119,10 @@
 	{ "swedish",      "swe", LANGAV_ASCII|LANGAV_LATIN1 },
 	{ "swiss-german", "swg", LANGAV_ASCII|LANGAV_LATIN1 },
 	{ "turkish",      "tur", LANGAV_ASCII|LANGAV_ISO8859_9 },
+	{ "ukrainian-w1251", "ukr", LANGAV_ASCII|LANGAV_W1251 },
 	{ "windows-1250", "cze-m,pol-m,rum,slo-m,hun",  LANGAV_ASCII|LANGAV_W1250 },
+/* I see no reason for the whole list of cp1251-enabled languages as it'll never be full. --ss */
+	{ "windows-1251", "w1251", LANGAV_ASCII|LANGAV_W1251 },
 	{ NULL, NULL, 0 }
 };
 
@@ -472,7 +477,7 @@
 
 void charsys_add_language(char *name)
 {
-char latin1=0, latin2=0, w1250=0, chinese=0;
+char latin1=0, latin2=0, w1250=0, w1251=0, chinese=0;
 
 	/** Note: there could well be some characters missing in the lists below.
 	 *        While I've seen other altnernatives that just allow pretty much
@@ -493,6 +498,8 @@
 		latin2 = 1;
 	else if (!strcmp(name, "windows-1250"))
 		w1250 = 1;
+	else if (!strcmp(name, "windows-1251"))
+		w1251 = 1;
 	else if (!strcmp(name, "chinese") || !strcmp(name, "gbk"))
 		chinese = 1;
 	
@@ -603,13 +610,29 @@
 	}
 
 	/* [windows 1251] */
-	if (!strcmp(name, "russian-w1251"))
+	if (w1251 || !strcmp(name, "russian-w1251"))
 	{
 		/* supplied by Roman Parkin:
 		 * 128-159 and 223-254
 		 */
 		charsys_addallowed("ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¨¸");
 	}
+	
+	if (w1251 || !strcmp(name, "belarussian-w1251"))
+	{
+		/* supplied by Anton Samets & ss:
+		 * 128-159, 161, 162, 178, 179 and 223-254
+		 */
+		charsys_addallowed("ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¨¸¡¢²³");
+	}	
+	
+	if (w1251 || !strcmp(name, "ukrainian-w1251"))
+	{
+		/* supplied by Anton Samets & ss:
+		 * 128-159, 170, 175, 178, 179, 186, 191 and 223-254
+		 */
+		charsys_addallowed("ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¨¸²³ªº¯¿");
+	}	
 
 	/* [GREEK] */	
 	if (!strcmp(name, "greek"))
