diff options
author | Samba Release Account <samba-bugs@samba.org> | 1997-05-08 21:17:59 +0000 |
---|---|---|
committer | Samba Release Account <samba-bugs@samba.org> | 1997-05-08 21:17:59 +0000 |
commit | 441855fe0e6b37201d2ef6a8375de4bcc76b9752 (patch) | |
tree | 4e252f09f197b913fca984f038a97be1c9d21abf /source3/lib | |
parent | b54b581b85cbc9f19508b864716ca7d17e31497d (diff) | |
download | samba-441855fe0e6b37201d2ef6a8375de4bcc76b9752.tar.gz samba-441855fe0e6b37201d2ef6a8375de4bcc76b9752.tar.bz2 samba-441855fe0e6b37201d2ef6a8375de4bcc76b9752.zip |
status.c: Added brief option. Patch from ccctim@mailbox.ucdavis.edu
client.c: Added translation of '/' characters to '\' characters. Suggested by friedl@mtndew.com (Stephen J. Friedl)
charcn.c: Fix for iso8859-2 (Eastern European) conversions based on a patch from Miroslaw M. Maczka <elvisbze@polbox.com>
(This used to be commit 27708a73cef690ea8aea0f3d82619eaed1fe476d)
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/charcnv.c | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/source3/lib/charcnv.c b/source3/lib/charcnv.c index cf4ae4edb6..b6debbec4a 100644 --- a/source3/lib/charcnv.c +++ b/source3/lib/charcnv.c @@ -51,7 +51,7 @@ static void update_map(char * str) { } } -static void initiso() { +static void init_iso8859_1() { int i; if (!mapsinited) initmaps(); @@ -79,6 +79,25 @@ update_map("\370\233\371\227\372\243\373\226\374\201\375\354\376\347\377\230"); } +/* Init for eastern european languages. May need more work ? */ + +static void init_iso8859_2() { + + int i; + if (!mapsinited) initmaps(); + + /* Do not map undefined characters to some accidental code */ + for (i = 128; i < 256; i++) + { + unix2dos[i] = CTRLZ; + dos2unix[i] = CTRLZ; + } + +update_map("\241\244\306\217\312\250\243\235\321\343\323\340\246\227\254\215"); +update_map("\257\275\261\245\346\206\352\251\263\210\361\344\363\242\266\230"); +update_map("\274\253\277\276"); +} + /* * Convert unix to dos */ @@ -125,8 +144,9 @@ int interpret_character_set(char *str, int def) { if (strequal (str, "iso8859-1")) { - initiso(); - return def; + init_iso8859_1(); + } else if (strequal (str, "iso8859-2")) { + init_iso8859_2(); } else { DEBUG(0,("unrecognized character set\n")); } |