X3J3/97-146 Page 1 of 1 To: WG5/X3J3 From: /MISC Subject: Internationalization - first thoughts Date: 13 February 1997 Here are some suggestions and thoughts on handling internationalization in Fortran 2000. 1. The local environment is controlled by 'locale' data that can be dynamically altered by the program. 2. There should be an intrinsic module called (say) i18n. It contains a derived type called (say) i18n_data and two procedures called (say) i18n_get_locale and i18n_set_locale. 3. The components of an object of type i18n_data contain locale data such as how a date is represented, whether a period is used for a decimal point, and how to compare two character strings. 4. The current locale data may be obtained by a call of i18n_get_locale and set with a call of i18n_set_locale. Each has an argument of type i18n_data. 5. A scoping unit with no use statement for the module behaves exactly as if the locale were set for Fortran 95. 6. There will an intrinsic function selected_character_kind that permits ISO 646 and ISO 10646 to be requested. 7. The module will contain a character function (say) i18n_currency that returns the currency symbol. 8. In a scoping unit that accesses the module, the locale affects: a. The arguments date and time of date_and_time and their lengths; they are permitted to be of nondefault kind. b. The values returned for relational operations on character strings (but not the fnctions lge, lgt, etc.) c. The represention of decimal points in i/o records. For list- directed and namelist i/o when commas are used for decimal points, semicolons are used for the comma delimiters of Fortran 95. d. The represention of quotation marks in i/o records. e. The value returned by the function i18n_currency. 9. The source form is as for Fortran 95. Characters of non-default kind are permitted only in character contexts. In particular, they are not permitted in identifiers or comments. Also, the decimal point in a real or complex constant is a period, and quotation marks are as for Fortran 95.