usage of d_printf() (Re: CVS update: samba/source/smbd)

TAKAHASHI Motonobu monyo at
Thu Sep 20 11:54:02 GMT 2001


I checked d_printf().
Sorry d_printf() does not solve problems very much, though I once
believed that d_printf() solved most of problems.

I apologize for this.

There are problems:

- SWAT cannot treat i18n chars input correctly when unix charset is
  different from dos charset.

  d_printf() cannot be used to convert SWAT input to the charset
  defined in unix charset.

  We have to convert the charset in print_parameter() at
  source/loadparm.c. SWAT calls print_parameter() through lp_dump() at

- d_printf() should be used only when displaying *strings from
  In SWAT i18n that I am working on, the i18n'ed gettext() messages
  use fixed charset (currently dos charset, for Japanese SJIS), so we
  must not use d_printf() to print the messages from gettext().
  So most of d_printf() in web/ directory needs to be removed. 

- d_printf() should be used only in SWAT.
  Charset of ommands output should depend on gettext() or OS locale
  Using gettext(), regardless of smb.conf setting, one can use one's
  favorite charset for command message.

  If Andrew allows to add the 2 directories po/ and intl/, we can
  start to gettext()'ize the command output.

TAKAHASHI, Motonobu(monyo)         monyo at
Personal -
Samba Team -     Samba-JP -  
JWNTUG -  Analog-JP -

More information about the samba-technical mailing list