summaryrefslogtreecommitdiff
path: root/source3/param
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-06-22 09:52:31 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-06-23 13:47:27 +0200
commit125a2ff262aa312df20eec68802fd5f8a47f492f (patch)
tree7308c0b58fa7016d8d174f2b50db32567f204895 /source3/param
parent6c3cef773a989f175c518b435feebab287a58cf0 (diff)
downloadsamba-125a2ff262aa312df20eec68802fd5f8a47f492f.tar.gz
samba-125a2ff262aa312df20eec68802fd5f8a47f492f.tar.bz2
samba-125a2ff262aa312df20eec68802fd5f8a47f492f.zip
lib/util/charset: Remove 'display charset'
As discussed in 'CH_DISPLAY and gettext' on the samba-technical list: http://lists.samba.org/archive/samba-technical/2011-June/078190.html Setting this to a value other than 'unix charset' does not make sense, as any system where the filesytem charset does not equal the terminal charset will already have problems with programs as simple as 'ls'. It also means that our output could not be pasted as our input in interactive programs or onto our command line, as we never did translate in the DISPLAY -> UNIX direction. The d_printf() calls are retained in case we need to revisit this, and to support display_set_stderr(). Andrew Bartlett
Diffstat (limited to 'source3/param')
-rw-r--r--source3/param/loadparm.c21
-rw-r--r--source3/param/loadparm_ctx.c1
2 files changed, 1 insertions, 21 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 1635373827..18fdc75834 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -130,7 +130,6 @@ struct global {
char *smb_ports;
char *dos_charset;
char *unix_charset;
- char *display_charset;
char *szPrintcapname;
char *szAddPortCommand;
char *szEnumPortsCommand;
@@ -970,15 +969,6 @@ static struct parm_struct parm_table[] = {
.flags = FLAG_ADVANCED
},
{
- .label = "display charset",
- .type = P_STRING,
- .p_class = P_GLOBAL,
- .ptr = &Globals.display_charset,
- .special = handle_charset,
- .enum_list = NULL,
- .flags = FLAG_ADVANCED
- },
- {
.label = "comment",
.type = P_STRING,
.p_class = P_LOCAL,
@@ -5186,14 +5176,6 @@ static void init_globals(bool reinit_globals)
/* using UTF8 by default allows us to support all chars */
string_set(&Globals.unix_charset, DEFAULT_UNIX_CHARSET);
-#if defined(HAVE_NL_LANGINFO) && defined(CODESET)
- /* If the system supports nl_langinfo(), try to grab the value
- from the user's locale */
- string_set(&Globals.display_charset, "LOCALE");
-#else
- string_set(&Globals.display_charset, DEFAULT_DISPLAY_CHARSET);
-#endif
-
/* Use codepage 850 as a default for the dos character set */
string_set(&Globals.dos_charset, DEFAULT_DOS_CHARSET);
@@ -5556,7 +5538,6 @@ static char *lp_string(const char *s)
FN_GLOBAL_CONST_STRING(lp_smb_ports, smb_ports)
FN_GLOBAL_CONST_STRING(lp_dos_charset, dos_charset)
FN_GLOBAL_CONST_STRING(lp_unix_charset, unix_charset)
-FN_GLOBAL_CONST_STRING(lp_display_charset, display_charset)
FN_GLOBAL_STRING(lp_logfile, szLogFile)
FN_GLOBAL_STRING(lp_configfile, szConfigFile)
FN_GLOBAL_CONST_STRING(lp_smb_passwd_file, szSMBPasswdFile)
@@ -7507,7 +7488,7 @@ bool lp_file_list_changed(void)
static void init_iconv(void)
{
global_iconv_handle = smb_iconv_handle_reinit(NULL, lp_dos_charset(),
- lp_unix_charset(), lp_display_charset(),
+ lp_unix_charset(),
true, global_iconv_handle);
}
diff --git a/source3/param/loadparm_ctx.c b/source3/param/loadparm_ctx.c
index 33e854d6e9..e80f6f1844 100644
--- a/source3/param/loadparm_ctx.c
+++ b/source3/param/loadparm_ctx.c
@@ -41,7 +41,6 @@ static const struct loadparm_s3_context s3_fns =
.dos_charset = lp_dos_charset,
.unix_charset = lp_unix_charset,
- .display_charset = lp_display_charset,
.realm = lp_realm,
.dnsdomain = lp_dnsdomain,