Hebrew codepage conversion

Yedidya Bar-david didi at tau.ac.il
Mon Mar 12 22:14:06 GMT 2001


Hello,

Following is a patch against samba 2.0.7 that allows the conversion by
samba of DOS codepage 862 filenames (as used by e.g. the hebrew version
of MS win 9x) to iso8859-8.
I only tested this on my machine, a Debian 2.2 with updates (e.g.
glibc 2.2) but the patch seems trivial to me enough to send even
though I understand you will probably won't be able to test it
against a hebrew version of windows.

Regards,

	didi

--- samba-2.0.7.orig/source/lib/charcnv.c
+++ samba-2.0.7/source/lib/charcnv.c
@@ -166,6 +166,20 @@
 update_map("\270\353\271\354\272\355\274\356\276\357\277\360");
 }
 
+/* Added by Yedidyah Bar-David (didi at tau.ac.il) */
+
+static void init_iso8859_8(void)
+{
+       setupmaps();
+
+/* MSDOS Code Page 862 -> ISO-8859-8 (Hebrew) */
+
+update_map("\340\200\341\201\342\202\343\203\344\204\345\205\346\206\347\207");
+update_map("\350\210\351\211\352\212\353\213\354\214\355\215\356\216\357\217");
+update_map("\360\220\361\221\362\222\363\223\364\224\365\225\366\226\367\227");
+update_map("\370\230\371\231\372\232");
+}
+
 /* Init for russian language (koi8) */
 
 static void init_koi8_r(void)
@@ -273,6 +287,8 @@
         init_iso8859_5();
     } else if (strequal (str, "iso8859-7")) {
         init_iso8859_7();
+    } else if (strequal (str, "iso8859-8")) {
+        init_iso8859_8();
     } else if (strequal (str, "koi8-r")) {
         init_koi8_r();
     } else if (strequal (str, "roman8")) {





More information about the samba mailing list