summaryrefslogtreecommitdiff
path: root/source4/param
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-13 22:46:33 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:50:04 +0100
commit2bf0cdd01cf399bf28125f9e2a0d419f4e94996c (patch)
tree3ec09d2f58be46c1f2a5a4a73a46100879e84aa4 /source4/param
parent83f9ee5860e581fda07932e0fda1326fa3bd4d4c (diff)
downloadsamba-2bf0cdd01cf399bf28125f9e2a0d419f4e94996c.tar.gz
samba-2bf0cdd01cf399bf28125f9e2a0d419f4e94996c.tar.bz2
samba-2bf0cdd01cf399bf28125f9e2a0d419f4e94996c.zip
r26434: Remove display charset from iconv convenience context.
(This used to be commit a76625994abf9906d54ae11f9c171f89063cf508)
Diffstat (limited to 'source4/param')
-rw-r--r--source4/param/loadparm.c8
-rw-r--r--source4/param/util.c1
2 files changed, 7 insertions, 2 deletions
diff --git a/source4/param/loadparm.c b/source4/param/loadparm.c
index 2b1937de05..982c186ae9 100644
--- a/source4/param/loadparm.c
+++ b/source4/param/loadparm.c
@@ -2464,6 +2464,12 @@ bool lp_load(struct loadparm_context *lp_ctx, const char *filename)
reload_charcnv(lp_ctx);
+ /* FIXME: Check locale in environment for this: */
+ if (strcmp(lp_display_charset(lp_ctx), lp_unix_charset(lp_ctx)) != 0)
+ d_set_iconv(smb_iconv_open(lp_display_charset(lp_ctx), lp_unix_charset(lp_ctx), true));
+ else
+ d_set_iconv((smb_iconv_t)-1);
+
return bRetval;
}
@@ -2581,7 +2587,7 @@ struct smb_iconv_convenience *lp_iconv_convenience(struct loadparm_context *lp_c
{
if (lp_ctx == NULL) {
return smb_iconv_convenience_init(talloc_autofree_context(),
- "CP850", "UTF8", "UTF8", true);
+ "CP850", "UTF8", true);
}
return lp_ctx->iconv_convenience;
}
diff --git a/source4/param/util.c b/source4/param/util.c
index 48ddbfdca0..4d4e562590 100644
--- a/source4/param/util.c
+++ b/source4/param/util.c
@@ -288,7 +288,6 @@ struct smb_iconv_convenience *smb_iconv_convenience_init_lp(TALLOC_CTX *mem_ctx,
{
return smb_iconv_convenience_init(mem_ctx, lp_dos_charset(lp_ctx),
lp_unix_charset(lp_ctx),
- lp_display_charset(lp_ctx),
lp_parm_bool(lp_ctx, NULL, "iconv", "native", true));
}