diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-06-22 09:52:31 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-06-23 13:47:27 +0200 |
commit | 125a2ff262aa312df20eec68802fd5f8a47f492f (patch) | |
tree | 7308c0b58fa7016d8d174f2b50db32567f204895 /lib/util/charset/codepoints.c | |
parent | 6c3cef773a989f175c518b435feebab287a58cf0 (diff) | |
download | samba-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 'lib/util/charset/codepoints.c')
-rw-r--r-- | lib/util/charset/codepoints.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/util/charset/codepoints.c b/lib/util/charset/codepoints.c index 71611bfc4c..305bfd717f 100644 --- a/lib/util/charset/codepoints.c +++ b/lib/util/charset/codepoints.c @@ -168,17 +168,16 @@ struct smb_iconv_handle *get_iconv_handle(void) { if (global_iconv_handle == NULL) global_iconv_handle = smb_iconv_handle_reinit(talloc_autofree_context(), - "ASCII", "UTF-8", "ASCII", true, NULL); + "ASCII", "UTF-8", true, NULL); return global_iconv_handle; } struct smb_iconv_handle *get_iconv_testing_handle(TALLOC_CTX *mem_ctx, const char *dos_charset, - const char *unix_charset, - const char *display_charset) + const char *unix_charset) { return smb_iconv_handle_reinit(mem_ctx, - dos_charset, unix_charset, display_charset, true, NULL); + dos_charset, unix_charset, true, NULL); } /** @@ -190,7 +189,6 @@ const char *charset_name(struct smb_iconv_handle *ic, charset_t ch) case CH_UTF16: return "UTF-16LE"; case CH_UNIX: return ic->unix_charset; case CH_DOS: return ic->dos_charset; - case CH_DISPLAY: return ic->display_charset; case CH_UTF8: return "UTF8"; case CH_UTF16BE: return "UTF-16BE"; case CH_UTF16MUNGED: return "UTF16_MUNGED"; @@ -261,14 +259,11 @@ static const char *map_locale(const char *charset) _PUBLIC_ struct smb_iconv_handle *smb_iconv_handle_reinit(TALLOC_CTX *mem_ctx, const char *dos_charset, const char *unix_charset, - const char *display_charset, bool native_iconv, struct smb_iconv_handle *old_ic) { struct smb_iconv_handle *ret; - display_charset = map_locale(display_charset); - if (old_ic != NULL) { ret = old_ic; close_iconv_handle(ret); @@ -297,7 +292,6 @@ _PUBLIC_ struct smb_iconv_handle *smb_iconv_handle_reinit(TALLOC_CTX *mem_ctx, ret->dos_charset = talloc_strdup(ret->child_ctx, dos_charset); ret->unix_charset = talloc_strdup(ret->child_ctx, unix_charset); - ret->display_charset = talloc_strdup(ret->child_ctx, display_charset); ret->native_iconv = native_iconv; return ret; |