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

TAKAHASHI Motonobu monyo at samba.gr.jp
Thu Sep 20 11:54:02 GMT 2001


Andrew, 

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
  write_config().

- d_printf() should be used only when displaying *strings from
  smb.conf*.
  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
  system.
  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 samba.org
Personal - http://home.monyo.com/
Samba Team - http://samba.org/     Samba-JP - http://www.samba.gr.jp/  
JWNTUG - http://www.jwntug.or.jp/  Analog-JP - http://www.jp.analog.cx/
MCSE+I, SCNA, CCNA, Turbo-CI






More information about the samba-technical mailing list