mirror of
https://github.com/samba-team/samba.git
synced 2025-07-30 19:42:05 +03:00
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 27708a73ce
)
This commit is contained in:
@ -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"));
|
||||
}
|
||||
|
Reference in New Issue
Block a user