summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2001-02-14 21:56:57 +0000
committerTim Potter <tpot@samba.org>2001-02-14 21:56:57 +0000
commit09b993ff4690e8036aab7bb45343b54fdd6976e7 (patch)
treee50915cb0c0b07567d41cc15602f2bb35f5f9913 /source3
parente1be2877f5c9f7b02d90bba5b43eacb2a82822de (diff)
downloadsamba-09b993ff4690e8036aab7bb45343b54fdd6976e7.tar.gz
samba-09b993ff4690e8036aab7bb45343b54fdd6976e7.tar.bz2
samba-09b993ff4690e8036aab7bb45343b54fdd6976e7.zip
Baltic codepage fixes from Toomas Soome <tsoome@ut.ee>
(This used to be commit 1f1fcea06d658375b234bbfedcabcedd01c66a88)
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/charcnv.c62
1 files changed, 62 insertions, 0 deletions
diff --git a/source3/lib/charcnv.c b/source3/lib/charcnv.c
index a5355aa7c8..7fedc282ba 100644
--- a/source3/lib/charcnv.c
+++ b/source3/lib/charcnv.c
@@ -19,7 +19,9 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+
#include "includes.h"
+
#define CTRLZ 26
extern int DEBUGLEVEL;
@@ -95,6 +97,42 @@ static void init_iso8859_1(int codepage) {
}
}
+static void init_iso8859_15(int codepage) {
+
+ setupmaps();
+
+
+ if (codepage == 775) {
+ /* MSDOS Code Page 775 -> ISO-8859-15 this is for estonian */
+update_map("\240\377\242\226\243\234\246\276\247\365");
+update_map("\250\325\251\250\253\256\254\252\255\360\256\251");
+update_map("\260\370\261\361\262\375\263\374\264\317\265\346\266\364\267\372");
+update_map("\270\330\271\373\273\257");
+update_map("\304\216\305\217\306\222");
+update_map("\311\220");
+update_map("\323\340\325\345\326\231\327\236");
+update_map("\330\235\334\232\337\341");
+update_map("\344\204\345\206\346\221");
+update_map("\351\202");
+update_map("\363\242\365\344\366\224\367\366");
+update_map("\370\233\374\201");
+ } else {
+ /* MSDOS Code Page 850 -> ISO-8859-15 */
+update_map("\240\377\241\255\242\275\243\234\244\317\245\276\246\321\247\365");
+update_map("\250\320\251\270\252\246\253\256\254\252\255\360\256\251\257\356");
+update_map("\260\370\261\361\262\375\263\374\264\350\265\346\266\364\267\372");
+update_map("\270\347\271\373\272\247\273\257\274\254\275\253\276\363\277\250");
+update_map("\300\267\301\265\302\266\303\307\304\216\305\217\306\222\307\200");
+update_map("\310\324\311\220\312\322\313\323\314\336\315\326\316\327\317\330");
+update_map("\320\321\321\245\322\343\323\340\324\342\325\345\326\231\327\236");
+update_map("\330\235\331\353\332\351\333\352\334\232\335\355\336\350\337\341");
+update_map("\340\205\341\240\342\203\343\306\344\204\345\206\346\221\347\207");
+update_map("\350\212\351\202\352\210\353\211\354\215\355\241\356\214\357\213");
+update_map("\360\320\361\244\362\225\363\242\364\223\365\344\366\224\367\366");
+update_map("\370\233\371\227\372\243\373\226\374\201\375\354\376\347\377\230");
+}
+}
+
/* Init for eastern european languages. */
static void init_iso8859_2(void) {
@@ -188,6 +226,26 @@ static void init_iso8859_9(void)
update_map("\xf8\x9b\xf9\x97\xfa\xa3\xfb\x96\xfc\x81\xfd\x8d\xfe\x9f\xff\xed");
}
+/* init for Baltic Rim */
+
+static void init_iso8859_13(void) {
+
+ setupmaps();
+
+ /* MSDOS Code Page 775 -> ISO-8859-13 */
+update_map("\240\377\241\246\242\226\243\234\244\237\245\367\246\247\247\365");
+update_map("\250\235\251\250\252\212\253\256\254\252\255\360\256\251\257\222");
+update_map("\260\370\261\361\262\375\263\374\264\362\265\346\266\364\267\372");
+update_map("\270\233\271\373\272\213\273\257\274\254\275\253\276\363\277\221");
+update_map("\300\265\301\275\302\240\303\200\304\216\305\217\306\267\307\355");
+update_map("\310\266\311\220\312\215\313\270\314\225\315\350\316\241\317\352");
+update_map("\320\276\321\343\322\356\323\340\324\342\325\345\326\231\327\236");
+update_map("\330\306\331\255\332\227\333\307\334\232\335\243\336\317\337\341");
+update_map("\340\320\341\324\342\203\343\207\344\204\345\206\346\322\347\211");
+update_map("\350\321\351\202\352\245\353\323\354\205\355\351\356\214\357\353");
+update_map("\360\325\361\347\362\354\363\242\364\223\365\344\366\224\367\366");
+update_map("\370\326\371\210\372\230\373\327\374\201\375\244\376\330\377\357");
+}
/* Init for russian language (koi8) */
@@ -298,6 +356,10 @@ void interpret_character_set(char *str, int codepage)
init_iso8859_7();
} else if (strequal (str, "iso8859-9")) {
init_iso8859_9();
+ } else if (strequal (str, "iso8859-13")) {
+ init_iso8859_13();
+ } else if (strequal (str, "iso8859-15")) {
+ init_iso8859_15(codepage);
} else if (strequal (str, "koi8-r")) {
init_koi8_r();
} else if (strequal (str, "roman8")) {