--- old/libpisock/util.c	2006-04-15 18:11:38.000000000 +0200
+++ new/libpisock/util.c	2006-04-15 18:18:48.000000000 +0200
@@ -54,8 +54,12 @@
 	char*	ob;
 	iconv_t cd;
 	size_t 	ibl, obl;
+	char*   pcharset;
 
-	cd = iconv_open(PILOT_CHARSET, charset);
+	if ((pcharset = getenv("PILOT_CHARSET")) == NULL)
+		pcharset = PILOT_CHARSET;
+
+	cd = iconv_open(pcharset, charset);
 	if (!cd)
 		return -1;
 
@@ -97,7 +101,11 @@
 	iconv_t cd;
 	size_t 	ibl, obl;
+	char*   pcharset;
 
-	cd = iconv_open(charset, PILOT_CHARSET);
+	if ((pcharset = getenv("PILOT_CHARSET")) == NULL)
+		pcharset = PILOT_CHARSET;
+
+	cd = iconv_open(charset, pcharset);
 	if (!cd)
 		return -1;
 
