svn commit: samba r3063 - in branches/SAMBA_4_0/source/lib: .
tridge at samba.org
tridge at samba.org
Tue Oct 19 10:15:34 GMT 2004
Author: tridge
Date: 2004-10-19 10:15:34 +0000 (Tue, 19 Oct 2004)
New Revision: 3063
WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/branches/SAMBA_4_0/source/lib&rev=3063&nolog=1
Log:
our default dos charset is CP850, but some systems don't have that, so
as a special case, automatically fall back to ASCII if its not found.
Modified:
branches/SAMBA_4_0/source/lib/charcnv.c
Changeset:
Modified: branches/SAMBA_4_0/source/lib/charcnv.c
===================================================================
--- branches/SAMBA_4_0/source/lib/charcnv.c 2004-10-19 10:02:02 UTC (rev 3062)
+++ branches/SAMBA_4_0/source/lib/charcnv.c 2004-10-19 10:15:34 UTC (rev 3063)
@@ -98,7 +98,21 @@
n2 = charset_name(to);
conv_handles[from][to] = smb_iconv_open(n2,n1);
+
+ if (conv_handles[from][to] == (smb_iconv_t)-1) {
+ if ((from == CH_DOS || to == CH_DOS) &&
+ strcasecmp(charset_name(CH_DOS), "ASCII") != 0) {
+ DEBUG(0,("dos charset '%s' unavailable - using ASCII\n",
+ charset_name(CH_DOS)));
+ lp_set_cmdline("dos charset", "ASCII");
+ n1 = charset_name(from);
+ n2 = charset_name(to);
+
+ conv_handles[from][to] = smb_iconv_open(n2,n1);
+ }
+ }
+
return conv_handles[from][to];
}
More information about the samba-cvs
mailing list