ISO/ IEC JTC1/SC22/WG21 N0742


					     Doc. No.:  95-0142/N0742
					     Date:     10 July 1995
					     Project:   Programming Language C++
					     Reply to:  Ichiro Koshida
					     E-mail:    koshida@cc.teu.ac.jp

Additional Japanese Public Review Comments
 IPSJ/ITSCJ/SC22  C++WG

========================
!begin
!category: technical
!position: [lib.ios.base] page 27-10
	   [lib.ios.cons] page 27-16 Table72
!problem:
The fill character set/get functions, which depend on charT
definition, belong to 'ios_base' as the following signature;

  int_type ios_base::fill () const;
  int_type ios_base::fill (int_type);

!proposed_action:

* Delete these two 'ios_base::fill' function signatures in page 27-10
  and Append them in 'basic_ios' class definition as follows;

  template <class charT, class traits = ios_traits<charT> >
  class basic_ios : public ios_base {
  public:
    ....
    int_type fill () const;
    int_type fill (int_type ch);
    ....
  };

  or (if we need not specify end-of-file character as the argument).

    char_type fill () const;
    char_type fill (char_type ch);

* Delete the row of 'fill' specified in Table 72.

!comment

The member function, 'fill' is used to set/get fill character which
istream/osream inserters refer to.  The fill character is a character
which is related to 'charT'.  So there should be the fill function
signatures in basic_ios not in ios_base, which is a collection of chaT
independent definitions/signatures.

!end
===========================
===========================
!begin
!category: technical
!position: [lob.ios.base.cons] 27-16
!problem

The current CD says that the default value of the 'getloc' member
function is 'locale::classic ()', which is the "C" locale, without
paying any attention to the global locale value.

It leads programmers for non-ASCII environment to impose an extra
inconvenience which can be avoided if the default value be
locale::locale() default constructor.

!proposed

Change the value of the getloc() in Table 72 to

  locale::locale ();

!comment

The global locale value represents the most suitable (or natural) one
for users' environment.  In order to support locales for non-ASCII
people, the main function of locale-oriented programs will begin with
the following code fragment;

   int main (int ac, char**av) {
       ...
       setlocale (LC_ALL, getenv ("LOCALE"));
       ...
   }

so as to change its behavior for their environment.  It is natural
that in some Japanese UNIX environment variables, there may be the
following definitions;

   LOCALE=ja.jp_EUC

If the default locale value would remain as locale::classic(), all the
programs for non-ASCII people would have to specify their locale value
right after constructing iostream object as follows;

    ifstream is ("FOO.TXT");
    is.imbue (locale (getenv ("LOCALE")));

though we can avoid to invoke the following 'imbue' function in case
the default value is global locale.

!end
===========================