Source: Japan Title: Guide for POSIX National Profile and National Locale Status: Working Draft Action Requested: Comment this document Text of contribution: #! /bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh 'gpnpnl.tex' <<'END_OF_FILE' X\documentstyle{iso} X\documenttype{TECHNICAL REPORT} X\standard{PDTR XXXXX} X\title{ISO/IEC PDPTR --- Guide for POSIX National Profile and National Locale} X X\begin{document} X\setcounter{footnote}{0} X\foreword XISO (the International Organization for Standardization) and IEC (the XInternational Electrical Commission) together form a system for Xworldwide standardization as a whole. National bodies that are members Xof ISO or IEC participate in the development of International Standards Xthrough technical committees established by the respective organization Xto deal with particular fields of technical activity. ISO and IEC Xtechnical committees collaborate in fields of mutual interest. Other Xinternational organizations, governmental and non-governmental, in Xliaison with ISO and IEC, also take part in the work. X XIn the field of information technology, ISO and IEC have established a Xjoint technical committee, ISO/IEC JTC 1. X XThe main task of a technical committee is to prepare International XStandards but in exceptional circumstances, the publication of a XTechnical Report of one of the following types may be proposed: X X\begin{itemize} X\item{type 1, when the required support cannot be obtained for the Xpublication of an International Standard, despite repeated efforts;} X\item{type 2, when the subject is still under technical development or Xwhere for any other reason there is the future but not immediate Xpossibility of an agreement on an International Standard;} X\item{type 3, when a technical committee has collected data of a Xdifferent kind from that which is normally published as an XInternational Standard (``state of the art'', for example).} X\end{itemize} X XTechnical Reports of types 1 and 2 are subject to review within three Xyears of publication, to decide whether they can be transformed into XInternational Standards. Technical Report of type 3 do not necessarily Xhave to be reviewed until the date they provide are considered to be no Xlonger valid or useful. X XISO/IEC DPTR xxxxx, which is a Technical Report of type 3, has been Xprepared by the Rapporteur Group on Internationalization under the XISO/IEC JTC 1/SC22/WG15 --- POSIX. X XSuggestions and comments for improvement of this document are welcome. XThey should be sent to: X X\begin{tabbing} XXXXXXXX \= XXXXXX \= XXXXXXXXXXXXXX \= XXXXXXXXXXXXXXX \kill X\> Nobuo Saito \\ X\> c/o SC22/POSIX WG \\ X\> Information Technology Standards Commission of Japan \\ X\> Kikai-Shinko Kaikan Bldg., 3-5-8 Shiba-Koen, \\ X\> Minato-Ku, Tokyo 105, Japan \\ X\\ X\> Tel: \> +81 3 3431 2808 \> Fax: +81 3 3431 6493 \\ X\> Email: \> posix@ccut.cc.u-tokyo.ac.jp X\end{tabbing} X X\newpage X\tableofcontents X\maketitle X X\section{Scope} XThis Technical Report provides guides for ISO/IEC member bodies Xin the process of specifying National Profiles and National Locales Xfor the ISO/IEC 9945 POSIX series of standards. X X\begin{itemize} X\item{POSIX National Profiles X\footnote{Hereafter through this document, for simplicity of Xwording, the word National Profile is used as synonym of the word POSIX XNational Profile, unless otherwise stated.} Xprovide requirements for adapting an implementation of POSIX standards to a Xcultural or regional environment, Xby specifying options and parameters of the POSIX standards Xto be used in conjunction with the POSIX standards. XImplementors can then conform to the POSIX National Profile Xto make their products suited for the market, Xand ISO/IEC member bodies can facilitate procurement Xby specifying their National Profiles as national standards. XUsers can obtain products which are suited for their needs and Xwith consistent behaviour across applications and platforms. A National XProfile may include National Locale specifications.} X X\item{POSIX National Locales X\footnote{Hereafter through this document, for simplicity of Xwording, the word National Locale is used as synonym of the word POSIX XNational Locale, unless otherwise stated.} Xspecify the culture dependent parameters Xwith the format of the locale definition file and the charmap file. XApplications can be written in an Xinternationally portable way by removing hard-coded culturally dependent Xdata or functions, and using the POSIX National Locale data instead. XImplementors can, using the National Locales, be relieved from specifying Xthe often very complex internationalization data themselves and instead rely Xon a credible source as the ISO/IEC member bodies. Users can benefit from Xproducts that are suited for their cultural needs and obtain consistent Xbehaviour across applications and platforms. ISO/IEC member bodies can Xfacilitate this process and provide procurement specifications via national Xstandards on National Locales.} X\end{itemize} X X\section{References} XThe following standards contain provisions which constitute provisions of Xthis report. X X\begin{references} X\bibitem[ISO/IEC 9945-1:1990]{posix.1}{Information technology --- XPortable Operating System Interface (POSIX) --- Part 1: System Application XProgram Interface (API) [C Language]} X\bibitem[ISO/IEC 9945-2:1993]{posix.2}{Information technology --- XPortable Operating System Interface (POSIX) --- Part 2: Shell and Utilities} X\bibitem[ISO/IEC 646:1983]{iso646}{Information processing --- XISO 7-bit coded character set for information interchange.} X\bibitem[ISO 2022:1986]{iso2022}{Information processing --- X7-bit and 8-bit coded character sets --- Code extension techniques.} X\bibitem[ISO 8859]{iso8859}{Information processing --- X8-bit single-byte coded graphic character sets --- Part 1, ..., Part 8.} X\bibitem[ISO/IEC 10646-1:1993]{iso10646}{Information technology --- XUniversal Multiple-Octet Coded Character Set (UCS)} X\bibitem[ISO/IEC Directives: 1992]{directive}{Procedures for the Xtechnical work of ISO/IEC JTC 1 on Information Technology.} X\bibitem[ISO/IEC Directives Part 2: 1989]{directive2}{Methodology for the Xdevelopment of International Standards.} X\bibitem[ISO/IEC Directives Part 3: 1989?]{directive3}{Drafting and Xpresentation of International Standards.} X\bibitem[ISO/IEC 9899:1990]{C}{Programming languages --- C.} X\bibitem[ISO/IEC 9899 PDAM/1]{MSE}{PDAM 9899 Amendment to ISO X9899 Programming languages --- C} X\bibitem[ISO/IEC JTC 1 N1335]{tsg-1}{TSG-1 Final Report} X\bibitem[ISO/IEC JTC1/SGFS N1030]{posix.0}{Draft Guide to the POSIX Open XSystems Environment.} X\bibitem[IEEE P1003.18/D5 (September 1991)]{posix.18}{Draft Standard Xfor Information Technology --- Standardized Profile --- USI-P001 Platform.} X\bibitem[WD of ISO/IEC TR 10000-1.3]{tr-oseprof} X{\footnote{Under revision}~Information technology --- Framework and taxonomy Xof International Standardized Profiles --- Part 1: Framework.} X\bibitem[WD of ISO/IEC TR 10000-3]{tr-oseprof} X{\footnote{Under development}~Information technology --- Framework and taxonomy Xof International Standardized Profiles --- Part 3: Taxonomy of XOpen System Environment Profiles. ????} X\end{references} X X\section{Definitions} XThe following definitions should be applied and referenced through this Xtechnical report: X X\clause{Terms defined in this report} X\subclause{POSIX Profile} Profile for International Standard is a set of Xspecifications of the parameters, the selections of the optional items and Xthe recommendations of the implementation related matters. POSIX Profile Xcorresponds to the same concept of the Profile for the POSIX International XStandard. X X\subclause{POSIX National Profile} XNational Profile is a subset of the POSIX XProfile which is strongly related to the culture dependent aspects of the XPOSIX. It also contains the definitions and recommendations for the usage Xof national or regional standards which support the handling of Xthe nation or region specific aspects X(e.g., the use of the coded character sets and so on). X\subclause{POSIX National Locale} XNational Locale is a subset of National XProfile, which gives profile options in the POSIX localedef format. X\subclause{POSIX National Body Conformance} XIt is the concept of the Xdegree of the preciseness of the coincidence between the specifications Xof a realized POSIX system and the POSIX National Profile. Since POSIX XNational Profile is not necessarily included in the POSIX Profile, Xsystems which pass the POSIX National Body Conformance may not pass the XPOSIX Conformance. X X\subclause{System Conformance} XTBD. X X\subclause{Application Conformance} XTBD. X X\clause{Terms defined in other documents} XThis part of the report uses the following terms defined in other Xrelevant documents: X X[Editor's Note: Different documents have different definitions of Xeach term, and currently there is no single definition of a Xspecific term. XIn the following part of this subclause, definitions from other documents Xare simply quoted.] X X\begin{enumerate} X\item{\bf Internationalization}: XA process of producing an application which is capable of being used in Xseveral national (or cultural) environments so that it can present Xoutput and obtain input in an appropriate format for each of these Xenvironments. X[TSG-1 Final Report] X XInternationalized application: XApplication software that allows localization of an application for some Xspecific cultural environment. X[TSG-1 Final Report] X Xinternationalization: The process of designing and developing Xan implementation with a set of features, functions, and options Xintended to facilitate the adaptation of the implementation to satisfy a Xvariety of cultural environments. X[P1003.0/D16] X X\item{\bf Localization}: XA process of adapting an internationalized application to a specific Xcultural environment. By localization, the same semantics has to be Xpreserved while the syntax may be changed. X[TSG-1 Final Report] X XThe process of utilizing the internationalization Xfeatures to create a version of the product for a specific culture. X[P1003.0/D16] X X X\item{\bf Portability}: XPortability (software): XThe ease with which software can be transferred from one information Xprocessing system to another. X[TSG-1 Final Report] X XPortability (application): XThe ease with which an application can be transferred from one Xapplication platform to another. X[TSG-1 Final Report] X XPortable application (information processing): XAn application which conforms to either an application environment Xprofile that is supported by at least two application platforms or Xconforms to an application specific environment description (a Xspecification of an application specific environment together with the Xspecification of resource requirements necessary for the satisfactory Xoperation of the application e.g. storage) that is supported by at least Xtwo application platforms. X[TSG-1 Final Report] X XApplication specific environment: XThe realization of a subset of an application environment profile, Xtogether with interfaces, services or supporting formats outside of the Xprofile, required by a particular application for its installation and Xexecution. X[TSG-1 Final Report] X XApplication environment profile: XThe specification fo a complete and coherent subset of an open system Xenvironment together with the options and parameters necessary to Xsupport a class of applications for interoperability or application Xportability, including consistency of data access and human interfaces. X[TSG-1 Final Report] X X\item{\bf Locale}: X Xlocale-specific behavior: Behavior that depends on local Xconventions of nationality, culture, and language that each Ximplementation shall document. X[ISO/IEC 9899:1990] X Xlocale: The definition of the subset of the environment of a Xuser that depends on language and cultural conventions. X[ISO/IEC 9945-2:1993] X Xlocale: A description of a cultural environment. X[P1003.0/D16] X\end{enumerate} X X\section{Abbreviations} X\begin{itemize} X\item[\bf OSE] Open System Environment X\item[\bf AEP] Application Environment Profile X\end{itemize} X X\section{Purpose of National Profile and National Locale} X\clause{Purpose of National Profiles} XNational Profiles for POSIX define Xculture- and language- dependent adaptation and interpretation of POSIX Xfor the following purposes. X X\begin{itemize} X\item{National Profile identifies the base international and Xnational or regional standards and clarify the relationships among Xthem.} X\item{National Profile identifies the base standards, together with Xappropriate culture- and language- specific classes, subsets, Xoptions and parameters, which are necessary to assure higher degree Xof portability.} X\item{National Profile gives detailed description of locale-dependent Xfunctions that are out of the scope of the Base International XStandard which provides frameworks for internationalization so that Xnational bodies can define appropriate language and culture Xdependent adaptation and interpretation based on it.} X\item{National Profile provides reference systems on top of which Xculture- and language dependent applications can be built to Xpromote POSIX based standards among users and vendors.} X\item{National Profile promotes the development of conformance tests that Xproduce consistent results for the systems compliant with POSIX and Xa given national profile.} X\end{itemize} X XVarious bodies throughout the world are undertaking work in the Xdefinition of National Profiles for POSIX based international standards. X XThis Guide for POSIX National Profile and National Locale has been Xdeveloped by XSC22/WG15 to make the National Profiles consistent and the harmonization Xof the National Profiles easier by defining the followings: X X\begin{itemize} X\item{Define style, documentation scope and classification scheme for XNational Profiles.} X\item{Define those items that should be written in National Profiles.} X\item{Define those items that should not be written in National Profiles.} X\end{itemize} X X\clause{Purpose of National Locales} XThe purpose of the national locale is to specify for a given culture, given Xby the country and the language and specified by a ISO member body, Xa POSIX locale that is directed towards this, so that users can refer to Xthis locale and obtain consistent behaviour across the hardware and Xsoftware platforms conforming to this locale. It is expected that Xmany national standardisation organisations will make national standards Xon their locales, which then can be used also for procurement. X XThe national locale will in most cases build on already existing national Xstandards, for example on formatting and collation, but will sometimes Xreflect customary specifications, for example for date and time there often Xdoes not exist an adequate national standard. X X\section{Concept of National Profiles} XPOSIX is a platform of Open System Environment (OSE), and AEP (Application XEnvironment Profile) is a set of parameters and the selection of options Xfor the base standards included in OSE to support the execution of Xapplication programs for a given application field. It includes the Xparameters and option selections for the relevant base standards such as Xthe platform standards like POSIX and application specific standards Xlike GKS (Graphical standard for 2D), SQL (Structured Query Language) and so on. X XA National Profile for a specific cultural region or a nation is a set Xof parameters and option selections for several base standards like XPOSIX. XThese standards may be national standards. XNational Profile Xcannot avoid such non-international standards because it should specify Xthe local cultural aspects. X XApplication Environment Profile and National Profile may be based on XNational Standards, and therefore it is necessary to coordinate in Xdefining the parameters and option selections from the view point of Xinternational harmonization to support international application Xportability and interoperability. X XGranting this fact, there are several levels of conformance both for a Xgiven POSIX application environment profile and a given POSIX National XProfile as follows: X XFor Application Environment Profile: X\begin{enumerate} X\item{\bf Strictly Conforming POSIX Application for POSIX AEP}: XAn application that can be executed for any parameters and options for POSIX X\item{\bf ISO/IEC Conforming POSIX Application for POSIX AEP}: XAn application that requires only specific POSIX related parameters and Xoptions. X\item{\bf ISO/IEC Conforming POSIX Application using Extensions for POSIX AEP}: XAn application that requires not only specific POSIX related Xparameters and options but also other ISO/IEC standards and their Xinternational profiles. X\end{enumerate} X XFor POSIX National Profile: X\begin{enumerate} X\item{\bf National Body Conforming POSIX Application for POSIX NP}: XAn application that requires only the POSIX related parameters and Xoptions defined in POSIX National Profile. X\item{\bf National Body Conforming POSIX Application using Extensions for XPOSIX NP}: XAn application that requires POSIX related parameters and options Xdefined in POSIX National Profile, national profiles for other XISO/IEC standards, and national body standards. X\end{enumerate} X X\clause{The relationship to base standards} XPOSIX base standards specify procedures and formats that facilitate the Xdevelopment of internationally portable applications across many Xcountries or regions. XThey may provide mechanisms for supporting Xlanguage or cultural dependent (locale specific) aspects. X XNational profiles promote applicability of the base standards to Xspecific countries or regions by defining locale specific aspects specified Xin the base standards for a specific country or region with appropriate Xchoice or value-setting of options and parameters. National profiles may also Xspecify additional standards which are required for locale specific Xfeatures' support. X XNational profiles shall not contradict base standards but shall make Xspecific choices where options and ranges of values are available. The Xchoice of the base standard options should be restricted so as to Xmaximize the application portability across National profiles. X X\clause{The relationship to Registration Authority} XSome objects specified in National Profile shall be administered and Xregistered to keep identification and to avoid conflict of values or Xnames adopted by each of the countries. X XThe administration and registration of such objects may be performed by XRegistration Authorities, or an appropriate Xorganization authorized by ISO/IEC/JTC1, with the procedure recognized Xand agreed internationally. X XThe following objects specified in National Profile should be registered Xand maintained by Registration Authorities. X X\begin{enumerate} X\item{locale definitions and their names} X\item{symbolic character names} X\item{coded character set and their names} X\item{character class names} X\end{enumerate} X X\clause{Principles of National Profile Content} X\subclause{General Principles} XGeneral Principles for a Profile specified in ISO/IEC/TR 10000-1, Xsubclause 6.3.1 [as in 1992-11-04 version WD of TR 10000-1.3] Xare applied to a POSIX National Profile. X X\subclause{Principles of National Profile Content} XA National Profile places a set of requirements which are useful in Xmaximizing application's portability for a specific country or region. It Xdoes not specify all of the functionalities of a system, but only that Xpart relevant to the function being used for locale-specific operation. X XThe content of a National Profile shall be specified in a codeset Xindependent way where it's possible. When some requirements are Xrecognized locale-specific but no clear indication can be made by a XNational Profile, it may include an informative guidance to Ximplementors. X X\subclause{Main elements of a National Profile Definition} XThe definition of a National Profile shall comprise the following Xelements: X X\begin{enumerate} X\item{a concise definition of the scope of the countries or regions for which the XNational Profile is defined, and of its purpose, which is capable of being Xused as an Executive Summary of the National Profile;} X\item{normative reference to a single set of base standards, including precise Xidentification of the actual texts of the base standards being Xused and of any approved amendments and technical corrigenda X(errata), conformance to which is identified as potentially having Xan impact on achieving portability using the National Profile;} X\item{normative and informative reference to any other relevant source Xdocuments, including National Body standard;} X\item{specification of the application or the function of each Xreferenced base standard, stating on the choice of classes Xor conforming subsets, and the selection of options, ranges of Xparameter values, etc. and reference to registered objects;} X X\item{specification of the locale information of each referenced base Xstandard;} X\item{a statement defining the requirements to be observed by systems Xclaiming conformance to the National Profile.} X\end{enumerate} X X\clause{The meaning of conformance to a National Profile} XThe concepts of System Conformance and Application Conformance Xare incorporated in the concept of National Profiles. XRequirements for the two types of conformance are specified in each XNational Profile for interoperability and for portability of Xapplications and data. XA real system is said to exhibit conformance if Xit conforms to the requirements of applicable POSIX standards. X XA National Profile shall address the following two topics: X X\begin{enumerate} X\item{System Conformance requirements (details as given in 6.6);} X\item{Application Conformance requirements (details as given in 6.7);} X\end{enumerate} X XThese requirements are stated in a POSIX National Profile. X XIn order to conform to a National Profile, a system shall perform Xcorrectly all the capabilities defined in the POSIX as mandatory and Xalso any options of the POSIX which it claims to include. X XA National Profile shall be defined in such a way that testing of its Ximplementation can be carried out in the most complete way possible Xbeing given the available testing methodologies. X X\clause{Conformance requirements of POSIX National Profiles} X[Editor's Note: to be completed.] X X\clause{System Conformance} X X\subclause{General} XThe choices of interfaces and functional behavior made in a National XProfile's system conformance requirements are specific to that XNational Profile and provide added facilities to the base standards. X XThe choices are not, therefore, arbitrary but need to be consistent with Xthe purpose of the National Profile and consistent across the base Xstandards referenced by it. X XIn order to avoid ambiguity in the relationship Xbetween the National Profiles and the base standards, Xthe implementation conformance requirements of a National XProfile shall be specified, where possible, by reference to the Xconformance requirements of the referenced base standards. X X\subclause{Requirements} XAll systems claiming conformance to a National Profile shall support the Xrequired interface and functionality defined in the National Profile. XThe system may provide additional functions or facilities not required Xby the National Profile. X X\clause{POSIX Application Conformance for National Profiles} XAll POSIX applications claiming conformance to the National Profile Xshall use only culture- and language-dependent services for one or more of the Xparameters and options defined in the National Profile and the facilities Xprovided by the National Profile and referenced base standards, and Xshall fall within one of the following categories: X X\subclause{$<$National Body$>$ Conforming POSIX Application} XA $<$National Body$>$ Conforming POSIX Application is an application that Xrequires only the Xparameters and options defined in POSIX National Profile for the said XNational Body. Such an application shall include a statement of Xconformance that documents all options and limit dependencies, and all Xother $<$National Body$>$ standards used. X X\subclause{$<$National Body$>$ Conforming POSIX Application Using Extensions} XA $<$National Body$>$ Conforming POSIX Application Using Extensions is an Xapplication that requires not only the parameters and options defined in XPOSIX National Profile but also other ISO/IEC standards and their XNational Profiles and several National Standards for the said National XBody. Such an application shall fully document its requirements for Xthese extended facilities, in addition to the documentation required of Xa $<$National Body$>$ Conforming POSIX Application. X X[Editor's Note: to be completed.] X X\section{Contents of National Profile} XPOSIX National Profile shall have the following structure. X\begin{quote}~ X X1. General X X1.1 Scope X XThe scope of the National Profile shall be described. XProvision of this section is mandatory. X X X1.2 Normative Reference X XThe standards which are referred by the National Profile as base standards Xshall be listed. Provision of this section is mandatory. X X X1.3 Objectives X XThe objectives of the National Profile shall be Xdescribed. Provision of this section is mandatory. X X1.4 Conformance X X1.4.1 Levels of conformance X XIf the National Profile defines some levels of conformance, Xthe levels shall be specified. Provision of this section Xis mandatory. X X X1.4.2 System conformance X XThe requirements to the National body conforming Xsystems shall be specified. Provision of this Xsection is mandatory. X X X1.4.3 Application conformance X XThe requirements to the National body conforming Xapplication shall be specified. Provision of this Xsection is mandatory. X X2. Names X XThe names which must not conflict with other National XProfile shall be listed. The names described here shall Xbe registered to ISO, when official registration Xmechanism is established. Provision of this section is mandatory. X X X2.1 Locale names X XThe name of locales which are specified in the National XProfile. Provision of this section is mandatory. X X2.2 Symbolic name of characters X XThe list of extended character's symbolic names or the Xnaming conventions for symbolic name of extended Xcharacters shall be specified. Provision of this section Xis mandatory. X X2.3 Name of coded character sets X XThe name of coded character sets which are referred by Xthe National Profile shall be listed. The names may be Xused for code conversion utilities and functions, also. XProvision of this section is mandatory. X X2.4 Character classes X XIf the National body specifies extra character class in XLC\_CTYPE category, the names and descriptions shall be Xspecified. This section is optional. X X2.5 Environment variables X XIf the National body specifies environment variables Xwhich are not specified in POSIX standard, name of the Xenvironment variables and its descriptions shall be Xspecified. This section is optional. X X2.6 Others X X3. POSIX X XFor each POSIX base standards, options, parameters and/or other Xrequirements shall be specified. X X3.1 ISO/IEC 9945-1 X X3.1.1 Options X XThe options of ISO/IEC 9945-1 selected by the national profile Xshall be specified. X X3.1.2 Parameters X XThe parameters of ISO/IEC 9945-1 defined by the national profile Xshall be specified. X X3.1.3 Implementation defined, undefined, or unspecified behavior X XThe implementation defined, undefined, or unspecified behavior of XISO/IEC 9945-1 defined by the national profile shall be specified. X X3.2 ISO/IEC 9945-1 Language Bindings X XFor each programming language binding, if the national profile Xhave specific requirements to the language binding options, Xparameters or other behavior not defined by the standards, Xsuch requirements shall be specified in this subclause. X X3.3 ISO/IEC 9945-2 X X3.3.1 Charmap X XThe contents of Charmaps shall be specified. Provision Xof this section is mandatory. X X3.3.2 Locale definition X XThe contents of locale definitions shall be specified. XProvision of this section is mandatory. X X3.3.3 Options X XThe options of ISO/IEC 9945-2 selected by the national profile Xshall be specified. X X3.3.3 Parameters X XThe parameters of ISO/IEC 9945-2 defined by the national profile Xshall be specified. X X3.3.3 Implementation defined, undefined, or unspecified behavior X XThe implementation defined, undefined, or unspecified behavior of XISO/IEC 9945-1 defined by the national profile shall be specified. X X4. Other standards X XFor each non-POSIX base standards, options, parameters and/or other Xrequirements shall be specified. X X5. Gaps X XA national profile provides a clear identification of the specific Xuser requirements which are satisfied by the profile. XOccasionally, satisfaction of some of these requirements requires Xa base standard which is not available. XThis is defined as a ``gap'' in available standards. XThese gaps cannot be ``filled'' within national profiles via Xcitation of specifications other than standards. X XOne purpose of identifying gaps in profiles is to define areas of Xneeded standards activities. XGaps should be identified by describing the missing functionality, Xnot by identifying the non-standard solution which may include Xmore or less functionality than is necessary and/or may describe Xan arbitrary or overly restrictive solution. XExamples of any documents that address the missing functionality Xmay be identified to assist in the development of these new standards. X XAnnex A Informative reference X XIf the National body has any recommended parameters, Xoptions and extensions, though not required for the Xprofile conformance, these features should be listed in Xthis section. This section is optional. X XAnnex B Notes and Rationale X X[Editor's Note: to be completed.] X X\end{quote} X X\section{Concept and consideration of National Locale} X\clause{Concept of POSIX national locale and charmap} XThe benefits of a national locale is examplified with the Danish example Xlocale included in ISO/IEC 9945-2. X XWork with the Danish locale produced a quite elaborate locale defined for Xa lot of character sets, including parts of ISO/IEC 10646-1 and almost all of Xthe ISO 2375 registry (done by ECMA), and some 60 vendor Xspecific character sets, in all about 140 character sets. XThe locale is available electronically together with the 140 charmaps. X XThus with just one specification of a national locale, uniform Xcollating for many character sets is defined - the characters will always come Xin the same sequence regardless of which character set employed. Also there Xis just one definition of date format and the other cultural items to be done, Xand that specification is then valid for many character sets. X X\clause{Contents of national locale} XIn creating a national locale, many things must be considered. XSome data may be easier determined than others. For each locale category Xthere is given some recommendations below. X X\clause{Consideration on character classification and transformation} XThe character classification section of the locale is normally Xstraightforward; an ``A'' is considered a letter in about all languages and Xis mapped to an ``a'' when the lowercase letter should be found. Normally Xthe LC\_CTYPE definition in POSIX.2 Annex G can be used without change. X X\clause{Consideration on numeric format} XThe data here is normally easy to determine, the ISO standard being using Xcomma as decimal punctuation, and period as the the thousands delimiter. X X\clause{Consideration on monetary format} XThe monetary formats may be a bit difficult to specify. The ISO 4217 Xcurrency code must be specified for the international format. the local Xspecification may be a choice, but there may be guidelines in national Xorthography specifications. X X\clause{Consideration on date-time format} XThere may be problems with specifying the date format, including time zone Xnames, which may not be well defined. In the Danish case we consulted Xas many official sources as possible, including orthography definitions and Xnumeric rendering standards. One thing we changed late in the process was to Xwrite day names with an initial small letter --- which was in accordance with Xthe Danish orthography dictionary. X X\clause{Consideration on Collating sequence} XThe Danish collating sequence was hard to define. XThere are many levels of complication for collation. For example Xthe telephone level, with Mc the same as Mac, numbers spelled out, Xcertain words like ``the'' ignored or moved to the end etc. XActually Danish has some rules like that, also in the official Xcollating standard DS 377 from 1980. Another level is the phonetic level --- Xsoundex, which is a little less complicated. A third level is Xtranscripted characters, as the librarians use when they see a Xgreek alpha and order that as a normal ``a''. X XThe level that Danish Standards have decided on for its POSIX.2 locale is Xthe systems interface level. The collating order should be usable in POSIX Xsystems tools like ls and sort. A requirement has been that it is Xdeterministic; if two strings are different they will also differ when Xcompared. Another issue has been efficiency. POSIX has provisions for Xsubstituting ``Mc'' with ``Mac'', but this is considered too inefficient Xand avoided in the Danish example national locale. X XThe problem of pronunciation and transliteration has not been Xaddressed. Instead it had been considered adequate just to look at the Xcharacters themselves --- only considering characters at the Xsystems level --- and not sounds. The level provided by the Danish locale Xis a service for comparing strings which are intended for a replacement to Xthe standard strcmp() etc. routines, just a little more intelligent and Xadhering to Danish collating rules. X XWe have however put as much intelligence in there as possible at Xthis level. The two letters $<$a$>$$<$a$>$ are sorted as the single letter X$<$aa$>$ (A WITH RING), but the $<$aa$>$ single letter is Xbefore $<$a$>$$<$a$>$ in homonyms. The 4 level scheme of the Canadian-French Xsorting is being used, with the four levels being letter, Xaccent, case and special character. This was actually also specified in the XDS 377. In cause of harmonization we decided to use the reverse sorting for Xthe accents as the Canadians do; the natural choice may have been forward Xsorting here too, but as most of these words would be of French origin anyway, Xwe decided to follow their rules. For $<$ss$>$ we implemented what we Xthink is the German rule, as seen in several German dictionaries. X$<$ss$>$ is ordered as $<$s$>$$<$s$>$ but before it in homonyms. X XFor the accents there was some indicated rules in the DS 377 and in the Xofficial Danish orthography dictionary, but it was far from complete. XThen the accent sequence in several ISO standards were used, when Xthere were no clear Danish rule. About 25 accents have been ordered. X XFor the non-Latin scripts we decided not to transcribe. XThis also allows us to use the native collation order for these Xscripts, like alpha, beta, gamma for Greek and a be ve ghe Xfor Cyrillic. Accented Greek and Cyrillic letters and ligatures Xhave been put into the right places. X XThe sequence of the scripts was taken as in the ISO 10646 draft. XThat should solve the question on which scripts should come Xbefore others. Current scripts addressed are: Latin, Greek, XCyrillic, Hebrew, Arabic, Kana and special characters. Ideographic Xcharacters are in the works. X XTogether with the Danish collating sequence a more general collating Xsequence was specified. This collating sequence could be used as a reference Xsequence, as mentioned below, and it should produce an order which is Xcompliant with at least English, French, German, Italian, Dutch, Portuguese, XGreek, Russian, Hebrew and Arabic. X XWe recommend that similar decisions are taken when producing a new Xcollating sequence. X X\clause{consideration on messages} XThe messages category are a hook to provide real message service in the Xapplications, and only yes/no is considered by the POSIX standard. X XFor the yes/no it is recommended that only the first letter of the answer Xin the natural language is required, and also to allow the English form X``Yes''/``No'', and the more cultural neutral 0/1 as answers. X X\section{Using existing locale} XMuch work is done on locales, and making them quite general. XWG15 RIN has on its programme of work to harmonize locales Xas far as it is feasible. The POSIX.2 standard introduced Xa copy command for all sections of the locale. This is good for Xmany purposes and it ensures that two locales are equivalent Xfor this category. A further step in building on previous art Xis proposed here. X XThe collating sequences vary a bit from country to country, Xbut generally much of the collating sequence is the same. XFor instance the Danish sequence is quite equal to the German, XEnglish or French, but for about a dozen letters it differs. XThe same can be said for Swedish or Spanish: generally the Latin Xcollating sequence is the same, but a few characters are different. X XWith the advent of the quite general coded character set Xindependent locales like the example Danish in POSIX.2 annex G, Xit would be convenient if the few differences could Xbe specified just as changes to an existing one. This would also Ximprove the overview of what the changes really are. Therefore it is Xrecommended to use the following replace-after construct in the LC\_COLLATE Xsection of the locale file format for producing new national locales. X X\clause{WG15 locale collection} XWG15 has been collecting POSIX locales for a number of years, Xand about 40 locales and 100 charmaps are available now. X X\clause{replace-after technique} X\begin{note} XSee description in CEN registration standard X\end{note} X X\annex X\section{Locale related descriptions in POSIX} X\begin{note} XWe have an extract in source form from the POSIX editor, Xwith permissions to reproduce it. It is not reproduced here Xdue to considerations for the rain forests, as it is about 70 pages. XIt is an extract of POSIX.2 on the first sections Xincluding 2.5 locales, and the 4.13 date format. X\end{note} X X\section{Formal Specification of Charmap --- Lexis, syntax and semantics} X[Editor's Note: This section will be provided by New Zealand National Body.] X X\section{Formal Specification of Locale --- Lexis, syntax and semantics} X[Editor's Note: This section will be provided by New Zealand National Body.] X X\section{Symbolic character names} X\begin{note} XAs in POSIX.2 annex G. As it is about 40 pages, it is not reproduced here. X\end{note} X X\section{Convenient tools for producing national locale} X XA script has been written in the ``awk'' language defined in POSIX.2 Xto implement the ``replace--after'' construct. X X\begin{verbatim} XBEGIN{ X comment = "%"; X back[0]= follow[0] = 0 X } X X/LC_COLLATE/ { coll=1 } X X/END LC_COLLATE/ { X coll=0; X for (lnr= 1; lnr; lnr= follow[lnr]) X print cont[lnr] X} X X{ if (coll == 0) print $0 ; X else { X if ($1 == "copy") { X file = $2 X while (getline < file ) X if ( $1 == "LC_COLLATE" ) copy_lc = 1 X else if ( $1 == "END" X && $2 == "LC_COLLATE" ) copy_lc =0 X else if (copy_lc) { X lnr++ X follow[lnr-1] = lnr X back [ lnr ] = lnr-1 X cont[lnr] = $0 X symb[ $1 ] = lnr X } X close (file ) X } X else if ($1 == "replace-after") X { ra=1 ; after = symb [ $2 ] } X else if ($1 == "replace-end") ra = 0 X else { X lnr++ X if (ra) follow [ lnr ] = follow [ after ] X if (ra) back [ follow [ after ] ] = lnr X follow[after] = lnr X back [ lnr ] = after X cont[lnr] = $0 X if ( ra && $1 != comment && $1 != "" ) { X old = symb [ $1 ] X follow [ back [ old ] ] = follow [ old ] X back [ follow [ old ] ] = back [ old ] X symb[ $1 ] = lnr X } X after = lnr X } X } X} X\end{verbatim} X X\section{Examples of National Profile} X[Editor's Note: XIt is ready to include an example of Japanese National Profile here. XSince the text is so large, the example is intentionally omitted Xfrom this review version of document. Please contact Japanese XNational Body for the details of Japanese National Profile.] X X\section{Examples of National Locale} X[Editor's Note: An example of Denmark National Locale will be provided here.] X X\end{document} END_OF_FILE if test 39682 -ne `wc -c <'gpnpnl.tex'`; then echo shar: \"'gpnpnl.tex'\" unpacked with wrong size! fi # end of 'gpnpnl.tex' fi echo shar: End of shell archive. exit 0