1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-05 12:23:50 +03:00

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
This commit is contained in:
Andrew Bartlett
2011-06-22 09:52:31 +10:00
parent 6c3cef773a
commit 125a2ff262
13 changed files with 63 additions and 157 deletions

View File

@@ -8,7 +8,6 @@ def CHECK_SAMBA3_CHARSET(conf, crossbuild=False):
'''
if conf.CHECK_ICONV(define='HAVE_NATIVE_ICONV'):
default_dos_charset=False
default_display_charset=False
default_unix_charset=False
# check for default dos charset name
@@ -17,12 +16,6 @@ def CHECK_SAMBA3_CHARSET(conf, crossbuild=False):
default_dos_charset=charset
break
# check for default display charset name
for charset in ['ASCII', '646']:
if conf.CHECK_CHARSET_EXISTS(charset, headers='iconv.h'):
default_display_charset=charset
break
# check for default unix charset name
for charset in ['UTF-8', 'UTF8']:
if conf.CHECK_CHARSET_EXISTS(charset, headers='iconv.h'):
@@ -37,16 +30,13 @@ def CHECK_SAMBA3_CHARSET(conf, crossbuild=False):
# match the results we get at runtime anyway.
if crossbuild:
default_dos_charset="CP850"
default_display_charset="ASCII"
default_unix_charset="UTF-8"
# TODO: this used to warn about the set charset on cross builds
conf.DEFINE('DEFAULT_DOS_CHARSET', default_dos_charset, quote=True)
conf.DEFINE('DEFAULT_DISPLAY_CHARSET', default_display_charset, quote=True)
conf.DEFINE('DEFAULT_UNIX_CHARSET', default_unix_charset, quote=True)
else:
conf.DEFINE('DEFAULT_DOS_CHARSET', "ASCII", quote=True)
conf.DEFINE('DEFAULT_DISPLAY_CHARSET', "ASCII", quote=True)
conf.DEFINE('DEFAULT_UNIX_CHARSET', "UTF8", quote=True)