From Miles.Ellis@etrc.ox.ac.uk  Thu Apr 30 14:05:08 1998
Received: from oxmail4.ox.ac.uk (oxmail4.ox.ac.uk [163.1.2.33]) by dkuug.dk (8.6.12/8.6.12) with SMTP id OAA07015 for <sc22wg5@dkuug.dk>; Thu, 30 Apr 1998 14:05:07 +0200
Received: from ermine.ox.ac.uk by oxmail4 with SMTP (PP) with ESMTP;
          Thu, 30 Apr 1998 13:04:52 +0100
Received: from [163.1.85.1] (com1.etrc.ox.ac.uk [163.1.85.1]) 
          by ermine.ox.ac.uk (1.1/8.8.3) with ESMTP id NAA26617 
          for <sc22wg5@dkuug.dk>; Thu, 30 Apr 1998 13:04:51 +0100 (BST)
X-Sender: mellis@ermine.ox.ac.uk
Message-Id: <l0302091cb16e156284ee@[163.1.85.1]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Date: Thu, 30 Apr 1998 13:05:33 +0100
To: "WG5 members (list)" <sc22wg5@dkuug.dk>
From: Miles Ellis <Miles.Ellis@etrc.ox.ac.uk>
Subject: Internationalization in Fortran

I have just received a copy of ISO/IEC TR 11017:1998 (Framework for
internationalization), which was prepared by WG20 as a guide for other WGs.
The TR describes the type of features that might be provided in languages
in order to provide i18n facilities.  There are, however, only two examples
in the whole report of actual example code - both in Fortran!

The first example shows how i18n features could be accessed from a Fortran
program by the addition of three intrinsic procedures:

CULTURAL_ENVIRONMENT
   which returns a processor-dependent code for the cultural environment
   specified as an argument

REPERTOIRE_KIND
   which returns the kind type of the character repertoire associated with
   the current cultural environment

SET_ENVIRONMENT
   which changes the current cultural environment

A "cultural environment" is essentially a language-independent "locale" for
those familiar with C and POSIX.  Once the environment and, if necessary,
the character set had been specified then it is assumed that the processor
would take care of a range of culturally sensitive issues (such as whether
to use a period or a comma as a decimal delimiter, for example).

The second example is a sample module which shows how a Fortran program
having access to the above three procedures (and their underlying model)
might implement culturally sensitive sorting using overloaded relational
operators.  This assumes the existence of two further intrinsic procedures
which provide the functions for generating keys and comparing strings
described elswhere in the TR, and which are based on the Canadian Standard
for ordering words in a culturally sensitive manner.

I would recommend that anyone interested in this topic should get hold of a
copy of this TR.  In particular, it might be useful for the J3 subgroup
developing i18n features for F2000.

Miles

Miles Ellis
Convenor:  ISO/IEC JTC1/SC22/WG5 (Fortran)

Email:  Miles.Ellis@etrc.ox.ac.uk
Phone: +44 1865 270528     Fax: +44 1865 270527


