Information technology — International string ordering and comparison — Method for comparing character strings and description of the common template tailorable ordering

Technologies de l'information — Classement international et comparaison de chaînes de caractères — Méthode de comparaison de chaînes de caractères et description du modèle commun et adaptable d'ordre de classement

General Information

Status
Withdrawn
Publication Date
04-Apr-2001
Withdrawal Date
04-Apr-2001
Current Stage
9599 - Withdrawal of International Standard
Completion Date
26-Nov-2007
Ref Project

Relations

Buy Standard

Standard
ISO/IEC 14651:2001 - Information technology -- International string ordering and comparison -- Method for comparing character strings and description of the common template tailorable ordering
English language
46 pages
sale 15% off
Preview
sale 15% off
Preview
Standard
ISO/IEC 14651:2001 - Information technology -- International string ordering and comparison -- Method for comparing character strings and description of the common template tailorable ordering
English language
46 pages
sale 15% off
Preview
sale 15% off
Preview
Standard
ISO/IEC 14651:2001 - Technologies de l'information -- Classement international et comparaison de chaînes de caracteres -- Méthode de comparaison de chaînes de caracteres et description du modele commun et adaptable d'ordre de classement
French language
42 pages
sale 15% off
Preview
sale 15% off
Preview

Standards Content (Sample)

INTERNATIONAL ISO/IEC
STANDARD 14651
First edition
2001-02-15
Information technology — International
string ordering and comparison — Method
for comparing character strings and
description of the common template
tailorable ordering
Technologies de l'information — Classement international et comparaison
de chaînes de caractères — Méthode de comparaison de chaînes de
caractères et description du modèle commun d'ordre de classement
Reference number
ISO/IEC 14651:2001(E)
©
ISO/IEC 2001

---------------------- Page: 1 ----------------------
ISO/IEC 14651:2001(E)
PDF disclaimer
This PDF file may contain embedded typefaces. In accordance with Adobe's licensing policy, this file may be printed or viewed but shall not
be edited unless the typefaces which are embedded are licensed to and installed on the computer performing the editing. In downloading this
file, parties accept therein the responsibility of not infringing Adobe's licensing policy. The ISO Central Secretariat accepts no liability in this
area.
Adobe is a trademark of Adobe Systems Incorporated.
Details of the software products used to create this PDF file can be found in the General Info relative to the file; the PDF-creation parameters
were optimized for printing. Every care has been taken to ensure that the file is suitable for use by ISO member bodies. In the unlikely event
that a problem relating to it is found, please inform the Central Secretariat at the address given below.
© ISO/IEC 2001
All rights reserved. Unless otherwise specified, no part of this publication may be reproduced or utilized in any form or by any means, electronic
or mechanical, including photocopying and microfilm, without permission in writing from either ISO at the address below or ISO's member body
in the country of the requester.
ISO copyright office
Case postale 56 � CH-1211 Geneva 20
Tel. + 41 22 749 01 11
Fax + 41 22 749 09 47
E-mail copyright@iso.ch
Web www.iso.ch
Printed in Switzerland
ii © ISO/IEC 2001 – All rights reserved

---------------------- Page: 2 ----------------------
ISO/IEC 14651:2001 (E)
Contents
Foreword .iv
Introduction.v
1. Scope . 1
2. Conformance. 2
3. Normative references. 2
4. Terms and definitions . 3
5. Symbols and abbreviations. 4
6. String comparison. 4
6.1. Preparation of character strings prior to comparison . 4
6.2. Key building and comparison. 5
6.2.1. Preliminary considerations . 5
6.2.2. Reference ordering key formation . 6
6.2.3. Reference comparison method for ordering character strings . 7
6.3. Common Template Table: formation and interpretation. 8
6.3.1. BNF syntax rules for the Common Template Table in Annex A . 9
6.3.2. Well-formedness conditions . 12
6.3.3. Interpretation of tailored tables.13
6.3.4. Evaluation of weight tables.14
6.3.5. Conditions for considering specific table equivalences. 15
6.3.6. Conditions for results to be considered equivalent . 15
6.4. Declaration of a delta. 16
6.5. Name of the Common Template Table and name declaration. 17
Annex A (normative) Common Template Table . 18
Annex B (informative) Example tailoring deltas. 19
B.1. Example 1 – Minimal tailoring. 19
B.2. Example 2 – Reversing the order of lowercase and uppercase letters. 19
B.3. Example 3 – Canadian delta and benchmark. 19
B.4. Example 4 – Danish delta and benchmark. 22
Annex C (informative) Preparation . 25
C.1. General considerations . 25
C.2. Thai string ordering – a case involving preparation required to get the proper ordering . 25
C.2.1. Thai Ordering Principle. 25
C.2.2 Algorithmic Aspect. 27
C.3. Handling of numeral substrings in collation. 29
C.3.1. Handling of ‘ordinary’ numerals for natural numbers. 29
C.3.2. Handling of positional numerals in other scripts. 32
C.3.3. Handling of other non-pure positional system numerals or non-positional system numerals
(e.g. Roman numerals). 32
C.3.4. Handling of numerals for whole numbers. 32
C.3.5. Handling of positive positional numerals with fractional parts. 34
C.3.6. Handling of positive positional numerals with fraction parts and exponent parts . 35
C.3.7. Handling of date and time of day indications. 35
C.3.8. Making numbers less significant than letters. 37
C.3.9. Maintaining determinacy. 37
Annex D (informative) Tutorial on solutions brought by this standard to problems of
lexical ordering. 38
D.1. Problems. 38
D.2. Solution . 39
D.3. Tailoring . 41
Bibliography. 42
© ISO/IEC 2001 -- All rights reserved iii

---------------------- Page: 3 ----------------------
ISO/IEC 14651:2001(E)
Foreword
ISO (the International Organization for Standardization) and IEC (the International Electrotechnical
Commission) form the specialized system for worldwide standardization. National bodies that are
members of ISO or IEC participate in the development of International Standards through technical
committees established by the respective organization to deal with particular fields of technical activity.
ISO and IEC technical committees collaborate in fields of mutual interest. Other international
organizations, governmental and non-governmental, in liaison with ISO and IEC, also take part in the
work.
International Standards are drafted in accordance with the rules given in the ISO/IEC Directives,
Part 3.
In the field of information technology, ISO and IEC have established a joint technical committee,
ISO/IEC JTC 1. Draft International Standards adopted by the joint technical committee are circulated
to national bodies for voting. Publication as an International Standard requires approval by at least
75 % of the national bodies casting a vote.
Attention is drawn to the possibility that some of the elements of this International Standard may be
the subject of patent rights. ISO and IEC shall not be held responsible for identifying any or all such
patent rights.
International Standard ISO/IEC 14651 was prepared by Joint Technical Committee ISO/IEC JTC 1,
Information technology, Subcommittee SC 22, Programming languages, their environments and
system software interfaces.
Annex A forms a normative part of this International Standard. Annexes B, C and D are for information
only.
vi © ISO/IEC 2001 – All rights reserved

---------------------- Page: 4 ----------------------
ISO/IEC 14651:2001 (E)
Introduction
This International Standard provides a method, applicable around the world, for ordering text data,
and provides a Common Template Table which, when tailored, can meet a given language’s ordering
requirements while retaining reasonable ordering for other scripts.
The Common Template Table requires some tailoring in different local environments. Conformance
to this International Standard requires that all deviations from the Template, called "deltas", be declared
to document resultant discrepancies.
This International Standard describes a method to order text data independently of context.
The Draft Technical Report ISO/IEC DTR 14652 (under development) has specifications for
ordering that informatively complements the specifications in this International Standard, and where
additional information may be sought on ordering keywords defined in this International Standard.
© ISO/IEC 2001 -- All rights reserved v

---------------------- Page: 5 ----------------------
INTERNATIONAL STANDARD ISO/IEC 14651:2001(E)
Information technology — International string ordering and
comparison — Method for comparing character strings and
description of the common template tailorable ordering
1. Scope
This International Standard defines:
• A reference comparison method. This method is applicable to two character strings to
determine their relative order. The method can be applied to strings containing characters
from the full repertoire of ISO/IEC 10646-1. This method is also applicable to subsets of that
repertoire, such as those of the different ISO/IEC 8-bit standard character sets, or any other
character set, standardised or not, to produce ordering results valid (after tailoring) for a given
set of languages for each script. This method uses collation tables derived either from the
Common Template Table defined in this International Standard or from one of its tailorings.
• A reference format. The format is described using the Backus-Naur Form (BNF). This format
is used to describe the Common Template Table. The format is used normatively within this
International Standard.
• A Common Template Table. A given tailoring of the Common Template Table is used by the
reference comparison method. The Common Template Table describes an order for all
characters encoded in the first edition of ISO/IEC 10646-1 up to Amendment 7. It allows for a
specification of a fully deterministic ordering. This table enables the specification of a string
ordering adapted to local ordering rules, without requiring an implementer to have knowledge
of all the different scripts already encoded in the UCS.
NOTE 1: This Common Template Table is to be modified to suit the needs of a local environment. The main
benefit, worldwide, is that for other scripts, often no modification may be required and that the order
will remain as consistent as possible and predictable from an international point of view.
NOTE 2: The character repertoire used in this International Standard is equivalent to that of the Unicode
Standard version 2.1.
• A reference name. The reference name refers to this particular version of the Common
Template Table, for use as a reference when tailoring. In particular, this name implies that the
table is linked to a particular stage of development of the ISO/IEC 10646 Universal multiple-
octet coded character set.
• Requirements for a declaration of the differences (delta) between the collation table and the
Common Template Table.
This International Standard does not mandate:
• A specific comparison method; any equivalent method giving the same results is acceptable.
• A specific format for describing or tailoring tables in a given implementation.
• Specific symbols to be used by implementations except for the name of the Common
Template Table.
• Any specific user interface for choosing options.
• Any specific internal format for intermediate keys used when comparing, nor for the table
used. The use of numeric keys is not mandated either.
© ISO/IEC 2001 – All rights reserved 1

---------------------- Page: 6 ----------------------
ISO/IEC 14651:2001 (E)
• A context-dependent ordering.
• Any particular preparation of character strings prior to comparison.
NOTE 1: It is normally necessary to do preparation of character strings prior to comparison even if it is not
prescribed by this International standard (see informative Annex C).
NOTE 2: Although no user interface is required to choose options or to specify tailoring of the Common

Template Table, conformance requires always declaring the applicable delta, a declaration of
differences with this table. It is recommended that processes present available tailoring options to
users.

2. Conformance
A process is conformant to this International Standard if it meets the requirements prescribed in
subclauses 6.2 to 6.5.
A declaration of conformity to this International Standard shall be accompanied by a statement,
either directly or by reference, of the following:
• The number of levels that the process supports; this number shall be at least three.
• Whether the process supports the forward,position processing parameter.
• Whether the process supports the backward processing parameter and at which level.
• The tailoring delta described in clause 6.4 and how many levels are defined in the delta.
It is the responsibility of implementers to show how their delta declaration is related to the table
syntax described in 6.3, and how the comparison method they use, if different from the one mentioned in
clause 6, can be considered as giving the same results as those prescribed by the method specified in
clause 6.
3. Normative references
The following normative documents contain provisions which, through reference in this text,
constitute provisions of this International Standard. For dated references, subsequent amendments to, or
revisions of, any of these publications do not apply. However, parties to agreements based on this
International Standard are encouraged to investigate the possibility of applying the most recent editions
of the normative documents indicated below. For undated references, the latest edition of the normative
document referred to applies. Members of ISO and IEC maintain registers of currently valid International
Standards.
• Information technology – Universal Multiple-Octet Coded Character
ISO/IEC 10646-1:1993
Set (UCS) – Part 1: Architecture and Basic Multilingual Plane
.
• ISO/IEC 10646-1:1993/Amd.1:1996 Information technology – Universal Multiple-Octet Coded
Character Set (UCS) – Part 1: Architecture and Basic Multilingual Plane Amendment 1:
Transformation Format for 16 planes of group 00 (UTF-16).
• Information technology – Universal Multiple-Octet Coded
ISO/IEC 10646-1:1993/Amd.2:1996
Character Set (UCS) – Part 1: Architecture and Basic Multilingual Plane Amendment 2: UCS
Transformation Format 8 (UTF-8)
.
• Information technology – Universal Multiple-Octet Coded
ISO/IEC 10646-1:1993/Amd.4:1996
Character Set (UCS) – Part 1: Architecture and Basic Multilingual Plane Amendment 4
.
2 © ISO/IEC 2001 -- All rights reserved

---------------------- Page: 7 ----------------------
ISO/IEC 14651:2001 (E)
• ISO/IEC 10646-1:1993/Amd.5:1998 Information technology – Universal Multiple-Octet Coded
Character Set (UCS) – Part 1: Architecture and Basic Multilingual Plane Amendment 5:
Hangul syllables.
• ISO/IEC 10646-1:1993/Amd.6:1997 Information technology – Universal Multiple-Octet Coded
Character Set (UCS) – Part 1: Architecture and Basic Multilingual Plane Amendment 6:
Tibetan.
• ISO/IEC 10646-1:1993/Amd.7:1997 Information technology – Universal Multiple-Octet Coded
Character Set (UCS) – Part 1: Architecture and Basic Multilingual Plane Amendment 7: 33
additional characters.
• ISO/IEC 10646-1:1993/Amd.9:1997 Information technology – Universal Multiple-Octet Coded
Character Set (UCS) – Part 1: Architecture and Basic Multilingual Plane Amendment 9:
Identifiers for characters.
• ISO/IEC 10646-1:1993/Amd.18:1999 Information technology – Universal Multiple-Octet
Coded Character Set (UCS) – Part 1: Architecture and Basic Multilingual Plane Amendment
18: Symbols and other characters.
NOTE: Only the EURO SIGN and the OBJECT REPLACEMENT CHARACTER from Amendment 18 are
accounted for in Annex A of this International Standard at this time.
4. Terms and definitions
For the purposes of this International Standard, the following terms and definitions apply:
4.1 character string a sequence of characters
4.2 collation equivalent to the term “ordering”
4.3 collating symbol a symbol used to specify weights assigned to a collating element
4.4 collation (weighting) table
a mapping from collating elements to weighting elements
4.5 collating element a sequence of one or more characters that are considered a single element
for ordering
4.6 delta differences from a given collation table. The given collation table, together
with a given delta, forms a new collation table. Unless otherwise specified in
this International Standard, the term "delta" always refers to differences from
the Common Template Table as defined in this International Standard
4.7 (collation) level the sequence number for a subkey
4.8 ordering a process by which two strings are determined to be in exactly one of the
relationships of less than, greater than, or equal to one another
4.9 ordering key a sequence of subkeys used to determine an order
4.10 (collation) preparation
a process in which given character strings are mapped to (other) character
strings logically before the calculation of the ordering key for each of the
strings
4.11 reference comparison method
the method for establishing an order between two ordering keys (see clause
6)
© ISO/IEC 2001 -- All rights reserved 3

---------------------- Page: 8 ----------------------
ISO/IEC 14651:2001 (E)
4.12 subkey a sequence of weights computed for a character string for a particular level.
4.13 symbol collating element
4.14 (collation) weight a positive integer value, used in subkeys, reflecting the relative order of
collating elements
4.15 weighting element
a list of a given number of weights sequentially ordered by level
5. Symbols and abbreviations
Following ISO/IEC 10646-1:1993, Amendment 9, characters are referenced as UXXXX where X
stands for any hexadecimal digit (using upper case letters where applicable) and refers to the value of
that character in ISO/IEC 10646-1. This convention is used throughout this International Standard.
In the Common Template Table arbitrary symbols representing weights are used according to the
BNF notation description in clause 6.3.1.
6. String comparison
6.1. Preparation of character strings prior to comparison
It may be necessary to transform character strings before the reference comparison method is
applied to them (see annex C for an example of such preparation). Although not part of the scope of this
International Standard, preparation may be an important part of the ordering process. See Annex C for
some examples of preparation.
Where applicable, it can be an important part of the preparation phase to map characters from a
non-UCS encoding scheme to the UCS for input to the comparison method. This task can amongst other
things encompass the correct handling of escape sequences in the originating encoding scheme, the
mapping of characters without an allocated UCS codepoint to an application-defined codepoint in the
private zone area and change the sequence of characters in strings that are not stored in logical order.
For example, for visual order Arabic code sets, input strings must be put into logical order; and for some
bibliographic code sets, strings with combining accents stored before their respective base character
require that the combining accents be put after their base character. The resulting string sequence may
then have to be remapped into its original encoding scheme.
NOTE 1: The Common Template Table is designed so that combining sequences and corresponding single

characters (precomposed) will have precisely the same ordering. To avoid inadvertently breaking
this invariant (and in the process breaking Unicode conformance), tailoring should reorder
combining sequences when corresponding characters are reordered. For example, if Ä is reordered
after Z, then the sequence + should also be reordered. To avoid
exposing encoding differences that may be invisible to the end-user, it is recommended that strings
be normalized according to Unicode normalization to achieve this equivalence – see Bibliography,
Unicode Technical Report no. 15.
NOTE 2: Escape sequences and control characters constitute very sensitive data to interpret, and it is highly
recommended that preparation should filter out or transform these sequences.
NOTE 3: Since the reference method is a logical statement for the mechanism for string comparison, it does
not preclude an implementation from using a non-UCS character encoding only, as long as it
produces results as if it were using the reference comparison method.

4 © ISO/IEC 2001 -- All rights reserved

---------------------- Page: 9 ----------------------
ISO/IEC 14651:2001 (E)
6.2. Key building and comparison
6.2.1. Preliminary considerations
6.2.1.1. Assumptions
The collation table is a mapping from collating elements to weighting elements. In each weighting
element, four levels are described in the Common Template Table. This number of levels can be
extended or reduced, but not below 3 levels, in tailoring.
NOTE: In the Common Template Table, levels generally have the following characteristics, although the
purpose of each level is not absolute:
Level 1: This level generally corresponds to the set of common letters of the alphabets for that script,
if the script is alphabetic, and to the set of common characters of the script if the script is ideographic
or syllabic.
Level 2: This level generally corresponds to diacritical marks affecting each basic character of the

script. For some languages, letters with diacritics are always considered an integral part of the basic
letters of the alphabet, and are not considered at this second level, but rather at the first. For
example, in Spanish, N TILDE is considered a basic letter of the Latin script. Therefore, tailoring for
Spanish will change the definition of N TILDE from "the weight of an N in the first level and the
weight of a TILDE in the second level" to "the weight of an N TILDE (placed after N and before O) in
the first level, and indication of the absence of a diacritic in the second level". For some characters,
variant letter shapes are also dealt with on level 2. An example of this is ß, the LATIN LETTER
SHARP S, which is treated as equivalent to ss on level 1, but traditionally distinguished from it on
level 2.
Level 3: This level generally corresponds to case distinctions or to distinctions based on variant
letter shapes (like the distinction between Hiragana and Katakana).
Level 4: This level generally corresponds to weighting differences that are less significant than those
at the other levels. Often the last level (level 4 in the Common Template Table) is intended to specify
additional weighting for "special" characters, i.e., characters normally not part of the spelling of
words of a language (such as dingbats, punctuation, etc.), sometimes called "ignorable" characters
in the context of computerized ordering.
6.2.1.2. Processing properties
A given tailored table has specific scanning and ordering properties. These properties may have
been changed by the tailoring.
A scanning direction (forward or backward) for each level is used to indicate how to process the
string. The scanning direction is a global property of each level defined in the tailored table.
An optional property of the last level of comparison, if that level is greater than three, is that before
comparing weights of each “ignorable” character, a comparison on the numeric position of each such
character in the two strings may be effected. This processing property is known as the ‘position’ option.
In other words, for two strings equivalent at all levels except the last one, the string having an ignorable
in the lowest position comes before the other one. In case corresponding “ignorables” are at the same
position, then their weights are considered, until a difference is found. Support for this kind of processing
is optional and is not necessary to claim conformance.
NOTE: The scanning direction (forward or backward) is not normally related to the natural writing direction
of scripts. The scanning direction applies to the logical sequence of the coded character string.
© ISO/IEC 2001 -- All rights reserved 5

---------------------- Page: 10 ----------------------
ISO/IEC 14651:2001 (E)
According to ISO/IEC 10646, for scripts written right to left, such as Arabic, the lowest positions in
the logical sequence of characters correspond to the rightmost characters of a string (from the point
of view of their natural presentation sequence). Conversely, for the Latin script, written left to right,
the lowest positions in the logical sequence of characters correspond to the leftmost characters of
the string (from the point of view of their natural presentation sequence).
Scanning forward starts with the lowest position in the logical sequence, while scanning backward
starts from the highest position, independently of the presentation sequence. The scanning direction
for ordering purposes is a global property of each level described in the table.
In ISO/IEC 10646-1, the Arabic script is artificially separated into two pseudo-scripts: 1) the logical,

intrinsic Arabic, coded independently of shapes, and 2) the Arabic presentation forms. Both allow
the complete coding of Arabic, but intrinsic Arabic is normally preferred for better processing, while
presentation-form Arabic is preferred by some presentation-oriented applications. ISO/IEC 10646-1
does not prescribe that the presentation forms be stored in any specific order, and in some
implementations, the storage order for the latter is the reverse of the storage order used for intrinsic
Arabic. It is therefore advisable that prehandling be used to make sure that Arabic presentation
forms and other Arabic characters be fed to the comparison method in logical order.
A tailored table may be separated into sections for ease of tailoring. Each section is then assigned a
name consistent with the specification in subclause 6.3.1. One of the tailoring possibilities is to assign a
given order to each section and to change the relative order of an entire section relative to other
sections.
6.2.2. Reference ordering key formation
When two strings are to be compared to determine their relative order, the two strings are first
broken up into a sequence of collating elements taking into accountthe multi-character “collating-
element” statements declared and used in a tailored table (if the syntax of clause 6.3.1 is used). For the
syntax used for expressing the Common Template Table, the name of a collating element consisting of a
single character, is formed by the UCS value of the character, expressed as a hexadecimal string,
prefixed with “U”. For multi-character collating elements, the name and association to characters can be
found via the collating elements declarations.
Then a sequence of m intermediary subkeys is formed out of a character string, where m is the
number of levels described in a tailored collation weighting table.
Each ordering key is a sequence of subkeys. Each subkey is a list of numeric weights. A subkey is
formed by successively appending the list of the weights assigned, at the level of the subkey, to each
collating element of the string. The keyword “IGNORE” in the Common Template Table at the place of a
sequence of collating symbols
...

INTERNATIONAL ISO/IEC
STANDARD 14651
First edition
2001-02-15
Information technology — International
string ordering and comparison — Method
for comparing character strings and
description of the common template
tailorable ordering
Technologies de l'information — Classement international et comparaison
de chaînes de caractères — Méthode de comparaison de chaînes de
caractères et description du modèle commun d'ordre de classement
Reference number
ISO/IEC 14651:2001(E)
©
ISO/IEC 2001

---------------------- Page: 1 ----------------------
ISO/IEC 14651:2001(E)
PDF disclaimer
This PDF file may contain embedded typefaces. In accordance with Adobe's licensing policy, this file may be printed or viewed but shall not
be edited unless the typefaces which are embedded are licensed to and installed on the computer performing the editing. In downloading this
file, parties accept therein the responsibility of not infringing Adobe's licensing policy. The ISO Central Secretariat accepts no liability in this
area.
Adobe is a trademark of Adobe Systems Incorporated.
Details of the software products used to create this PDF file can be found in the General Info relative to the file; the PDF-creation parameters
were optimized for printing. Every care has been taken to ensure that the file is suitable for use by ISO member bodies. In the unlikely event
that a problem relating to it is found, please inform the Central Secretariat at the address given below.
This CD-ROM contains the publication ISO/IEC 14651 in portable document format (PDF), which can be viewed
using Adobe® Acrobat® Reader, and the associated common template table
...

NORME ISO/CEI
INTERNATIONALE 14651
Première édition
2001-02-15


Technologies de l'information —
Classement international et comparaison
de chaînes de caractères — Méthode de
comparaison de chaînes de caractères et
description du modèle commun et
adaptable de classement
Information technology — International string ordering and comparison —
Method for comparing character strings and description of the common
template tailorable ordering



Numéro de référence
ISO/CEI 14651:2001(F)
©
ISO/CEI 2001

---------------------- Page: 1 ----------------------
ISO/CEI 14651:2001(F)
PDF – Exonération de responsabilité
Le présent fichier PDF peut contenir des polices de caractères intégrées. Conformément aux conditions de licence d'Adobe, ce fichier peut
être imprimé ou visualisé, mais ne doit pas être modifié à moins que l'ordinateur employé à cet effet ne bénéficie d'une licence autorisant
l'utilisation de ces polices et que celles-ci y soient installées. Lors du téléchargement de ce fichier, les parties concernées acceptent de fait la
responsabilité de ne pas enfreindre les conditions de licence d'Adobe. Le Secrétariat central de l'ISO décline toute responsabilité en la
matière.
Adobe est une marque déposée d'Adobe Systems Incorporated.
Les détails relatifs aux produits logiciels utilisés pour la création du présent fichier PDF sont disponibles dans la rubrique General Info du
fichier; les paramètres de création PDF ont été optimisés pour l'impression. Toutes les mesures ont été prises pour garantir l'exploitation de
ce fichier par les comités membres de l'ISO. Dans le cas peu probable où surviendrait un problème d'utilisation, veuillez en informer le
Secrétariat central à l'adresse donnée ci-dessous.


©  ISO/CEI 2001
Droits de reproduction réservés. Sauf prescription différente, aucune partie de cette publication ne peut être reproduite ni utilisée sous quelque
forme que ce soit et par aucun procédé, électronique ou mécanique, y compris la photocopie et les microfilms, sans l'accord écrit de l’ISO à
l’adresse ci-après ou du comité membre de l’ISO dans le pays du demandeur.
ISO copyright office
Case postale 56 • CH-1211 Geneva 20
Tel. + 41 22 749 01 11
Fax. + 41 22 749 09 47
E-mail copyright@iso.org
Web www.iso.org
Version française parue en 2002
Imprimé en Suisse

ii © ISO/CEI 2001 – Tous droits réservés

---------------------- Page: 2 ----------------------
ISO/CEI 14651:2001(F)
Sommaire Page
Avant-propos . iv
Introduction. v
1 Domaine d'application . 1
2 Conformité . 2
3 Références normatives. 2
4 Termes et définitions . 3
5 Symboles et abréviations. 4
6 Comparaison de chaînes. 4
6.1 Prétraitement des chaînes de caractères avant comparaison . 4
6.2 Construction des clés et comparaison. 5
6.2.1. Préliminaires. 5
6.2.2. Méthode de référence de construction des clés. 6
6.2.3. Méthode de comparaison de référence pour le tri des chaînes de caractères . 7
6.3 Table-modèle commune : composition et interprétation. 8
6.3.1. Règles de syntaxe BNF pour la table-modèle commune de l’annexe A. 8
6.3.2. Contraintes de forme . 11
6.3.3. Interprétation des tables adaptées. 13
6.3.4. Évaluation des tables de poids. 14
6.3.5. Conditions d’équivalence de tables spécifiques . 14
6.3.6. Conditions d’équivalence des résultats . 14
6.4 Déclaration d’un delta. 15
6.5. Nom de la table-modèle commune et déclaration de nom . 16
Annexe A (normative) Table-modèle commune. 17
Annexe B (informative) Exemples de deltas d’adaptation. 18
B.1 Exemple 1 – Adaptation minimale . 18
B.2 Exemple 2 – Renversement de l’ordre des minuscules et majuscules . 18
B.3 Exemple 3 – Delta et banc d’essai canadiens . 18
B.4 Exemple 4 – Delta et banc d’essai danois. 21
Annexe C (informative) Prétraitement. 24
C.1 Généralités . 24
C.2 Tri de chaînes en thaï – prétraitement nécessaire pour obtenir un tri correct . 24
C.2.1. Principe du tri en thaï. 24
C.2.2 Aspect algorithmique. 26
C.3 Traitement de sous-chaînes numériques dans le tri . 28
C.3.1. Traitement des nombres « ordinaires » pour les entiers naturels . 28
C.3.2. Traitement des nombres positionnels dans les autres écritures. 30
C.3.3. Traitement des systèmes de numération non positionnels (p. ex. chiffres romains). 31
C.3.4. Traitement des nombres entiers . 31
C.3.5. Traitement des nombres positionnels positifs à partie fractionnaire.32
C.3.6. Traitement des nombres positionnels positifs à partie fractionnaire et exposant. 33
C.3.7. Traitement des dates et heures. 34
C.3.8. Nombres moins importants que les lettres . 35
C.3.9. Maintien du déterminisme . 35
Annexe D (informative) Annexe didactique sur les solutions apportées par cette norme aux
problèmes de tri lexical . 37
D.1 Problèmes . 37
D.2 Solution. 38
D.3 Adaptation . 40
Bibliographie. 41
© ISO/CEI 2001 – Tous droits réservés iii

---------------------- Page: 3 ----------------------
ISO/CEI 14651:2001(F)
Avant-propos
L'ISO (Organisation internationale de normalisation) et la CEI (Commission électrotechnique internationale)
forment le système spécialisé de la normalisation mondiale. Les organismes nationaux membres de l'ISO ou de la
CEI participent au développement de Normes internationales par l'intermédiaire des comités techniques créés par
l'organisation concernée afin de s'occuper des domaines particuliers de l'activité technique. Les comités
techniques de l'ISO et de la CEI collaborent dans des domaines d'intérêt commun. D'autres organisations
internationales, gouvernementales et non gouvernementales, en liaison avec l'ISO et la CEI participent également
aux travaux.
Les Normes internationales sont rédigées conformément aux règles données dans les Directives ISO/CEI, Partie 3.
Dans le domaine des technologies de l'information, l'ISO et la CEI ont créé un comité technique mixte,
l'ISO/CEI JTC 1. Les projets de Normes internationales adoptés par le comité technique mixte sont soumis aux
organismes nationaux pour vote. Leur publication comme Normes internationales requiert l'approbation de 75 % au
moins des organismes nationaux votants.
L'attention est appelée sur le fait que certains des éléments de la présente Norme internationale peuvent faire
l'objet de droits de propriété intellectuelle ou de droits analogues. L'ISO et la CEI ne sauraient être tenues pour
responsables de ne pas avoir identifié de tels droits de propriété et averti de leur existence.
La Norme internationale ISO/CEI 14651 a été élaborée par le comité technique mixte ISO/CEI JTC 1, Technologies
de l'information, sous-comité SC 22, Langages de programmation, leur environnement et interfaces des logiciels
de systèmes.
L'annexe A constitue un élément normatif de la présente Norme internationale. Les annexes B, C et D sont
données uniquement à titre d'information.

iv © ISO/CEI 2001 – Tous droits réservés

---------------------- Page: 4 ----------------------
ISO/CEI 14651:2001(F)
Introduction
Cette Norme internationale fournit une méthode universelle de mise en ordre des données textuelles. La norme
fournit également une table-modèle commune qui, lorsque adaptée, peut satisfaire aux exigences de tri d’une
langue donnée tout triant de manière raisonnable les autres écritures.
La table-modèle commune est conçue de telle sorte qu’une adaptation s’avère nécessaire pour chaque
environnement local. C’est pourquoi la conformité à cette Norme internationale requiert que les modifications à
cette table commune, appelées «deltas», soient déclarées de manière à documenter les différences dans les
résultats.
La présente Norme décrit une méthode pour classer l’information textuelle de manière indépendante du contexte.
L’ébauche de rapport technique ISO/CEI DTR 14652 (projet en cours) contient des dispositions complémentaires
pour le tri à celle de cette Norme internationale; on y trouvera aussi des renseignements complémentaires sur les
mots-clés de tri définis dans cette Norme internationale.
© ISO/CEI 2001 – Tous droits réservés v

---------------------- Page: 5 ----------------------
NORME INTERNATIONALE ISO/CEI 14651:2001(F)

Technologies de l'information — Classement international et
comparaison de chaînes de caractères — Méthode de
comparaison de chaînes de caractères et description du modèle
commun et adaptable de classement
1 Domaine d'application
Cette Norme internationale définit :
• une méthode de référence pour la comparaison de deux chaînes de caractères ayant pour but de
déterminer leur ordre de classement dans une liste triée. La méthode s'applique à des chaînes utilisant le
répertoire complet de l’ISO/CEI 10646, des sous-répertoires tels que ceux des divers jeux normalisés
ISO/CEI à 8 bits ou tout autre jeu de caractères, et permet de produire des résultats de tri valables (après
adaptation) pour un ensemble de langues de chaque système d’écriture. Cette méthode de référence
utilise des tables de tri dérivées soit de la table-modèle commune de classement, soit d’une de ses
adaptations.
• un format de référence de la table-modèle commune. Ce format est décrit en notation BNF (forme de
Backus-Naur). Son emploi est normatif dans cette Norme internationale.
• une table-modèle commune de classement utilisée par la méthode de référence. Cette table décrit un
ordre de base pour tous les caractères de l’ISO/CEI 10646 jusqu’à son amendement 7. Cette table
constitue le point de départ permettant de préciser un ordre de classement culturellement acceptable pour
une culture donnée, sans qu’il soit nécessaire de connaître tous les systèmes d’écriture repris dans le
JUC.
NOTE 1 : On désire souvent pouvoir modifier cet ordre avec un minimum d'efforts pour satisfaire les besoins
d'environnements locaux. L'avantage principal de cette pratique, sur le plan mondial, réside dans le fait que pour
d'autres systèmes d’écriture que celui de l’utilisateur, aucune modification n’est nécessaire et que cet ordre
demeurera aussi cohérent que possible et prévisible dans un contexte international.
NOTE 2 : Le répertoire de caractères utilisé dans cette Norme internationale est équivalent à celui du standard Unicode,
version 2.1.
• un nom de référence représentant cette version particulière de la table-modèle commune, à utiliser comme
point de départ à toute adaptation. Ce nom implique notamment que la table est liée à un stade de
développement particulier du jeu universel de caractères codés sur plusieurs octets (ISO/CEI 10646).
• des exigences pour la déclaration de différences (delta) entre une table de tri et la table-modèle commune.
La présente Norme internationale ne prescrit pas :
• de méthode particulière de comparaison ; toute méthode équivalente conduisant aux mêmes résultats est
acceptable ;
• de format précis pour décrire ou pour adapter les tables dans une mise en œuvre donnée ;
• de symboles précis à utiliser par les mise en oeuvre, sauf pour ce qui est du nom de la table-modèle
commune de classement ;
• d’interface utilisateur particulière destinée à choisir les options ;
© ISO/CEI 2001 – Tous droits réservés 1

---------------------- Page: 6 ----------------------
ISO/CEI 14651:2001(F)
• de format interne particulier pour les clés intermédiaires utilisées dans les comparaisons ou pour la table
de tri. L’utilisation de clés numériques n’est pas prescrite non plus ;
• d’ordre dépendant du contexte ;
• de prétraitement particulier des chaînes de caractères avant comparaison.
NOTE 1 : Bien que ceci ne soit pas prescrit par cette Norme internationale, il s’avère souvent nécessaire de préparer les
chaînes de caractères avant leur comparaison (cf. l’annexe informative C).
NOTE 2 : Bien que l’on ne prescrive aucune interface utilisateur destinée à choisir les options ou à adapter la table-modèle
commune, la clause de conformité exige de toujours déclarer un delta, c’est à dire l’ensemble des différences par
rapport à cette table. Il est fortement recommandé que l’application présente à l’utilisateur les options et
adaptations disponibles.
2 Conformité
Un processus est conforme à cette Norme internationale s’il satisfait les prescriptions des articles 6.2 à 6.5.
Toute déclaration de conformité à cette Norme internationale doit être accompagnée, directement ou par
référence, d’une déclaration de ce qui suit :
• le nombre de niveaux de tri que le processus peut utiliser ; ce nombre doit être égal ou supérieur à trois ;
• si le paramètre de traitement forward,position est permis ;
• si le paramètre de traitement backward est permis et à quel niveau ;
• le delta d’adaptation décrit à l’article 6.4 et le nombre de niveaux définis dans ce delta.
Il incombe au producteur de montrer en quoi sa déclaration de delta est reliée à la syntaxe de la table décrite à
l’article 6.3 et comment la méthode de comparaison utilisée, si elle est différente de celle mentionnée à l’article 6.1,
peut être considérée comme produisant les mêmes résultats que ceux prescrits par la méthode décrite à la clause 6.
3 Références normatives
Les normes suivantes contiennent des dispositions qui, en raison de la référence qui y est faite, constituent des
dispositions valables pour la présente Norme internationale. Quand une date de publication est fournie pour une
norme, les modifications ou révisions ultérieures ne s'appliquent pas. Cependant, les parties prenantes d’accords
fondés sur la présente Norme internationale sont invitées à examiner la possibilité de mettre en œuvre les éditions les
plus récentes des normes indiquées ci-après. Pour les normes fournies sans date de publication, la dernière édition
du document normatif en question s'applique.
Les membres de la CEI et de l'ISO tiennent à jour des registres des normes internationales en vigueur.
• ISO/CEI 10646-1:1993 Technologies de l'information – Jeu universel de caractères codés à plusieurs
octets – Partie 1: Architecture et table multilingue.
• ISO/CEI 10646-1:1993/Amd.1:1996 Technologies de l'information – Jeu universel de caractères codés à
plusieurs octets – Partie 1: Architecture et table multilingue. Amendement 1: Format de transformation
pour 16 plans du groupe 00 (UTF-16).
• ISO/CEI 10646-1:1993/Amd.2:1996 Technologies de l'information – Jeu universel de caractères codés à
plusieurs octets – Partie 1: Architecture et table multilingue. Amendement 2: Format de transformation
UCS 8 (UTF-8).
2 © ISO/CEI 2001 – Tous droits réservés

---------------------- Page: 7 ----------------------
ISO/CEI 14651:2001(F)
• ISO/CEI 10646-1:1993/Amd.4:1996 Technologies de l'information – Jeu universel de caractères codés à
plusieurs octets – Partie 1 : Architecture et table multilingue. Amendement 4.
• ISO/CEI 10646-1:1993/Amd.5:1998 Technologies de l'information – Jeu universel de caractères codés à
plusieurs octets – Partie 1: Architecture et table multilingue. Amendement 5: Syllabes Hangul.
• ISO/CEI 10646-1:1993/Amd.6:1997 Technologies de l'information – Jeu universel de caractères codés à
plusieurs octets – Partie 1: Architecture et table multilingue. Amendement 6: Tibétain.
• ISO/CEI 10646-1:1993/Amd.7:1997 Technologies de l'information – Jeu universel de caractères codés à
plusieurs octets – Partie 1: Architecture et table multilingue. Amendement 7: 33 caractères additionnels.
• ISO/CEI 10646-1:1993/Amd.9:1997 Technologies de l'information – Jeu universel de caractères codés à
plusieurs octets – Partie 1: Architecture et table multilingue. Amendement 9: Identificateurs de caractères.
• ISO/CEI 10646-1:1993/Amd.18:1999 Technologies de l'information – Jeu universel de caractères codés à
plusieurs octets – Partie 1: Architecture et table multilingue. Amendement 18: Symboles et autres
caractères.
NOTE : Seuls le SYMBOLE EURO et le CARACTÈRE DE REMPLACEMENT D'OBJET de l’amendement 18 sont repris
dans l’annexe A de cette Norme internationale.
4 Termes et définitions
Dans le cadre de cette Norme internationale, les définitions suivantes s’appliquent :
4.1 chaîne de caractères
suite de caractères considérée comme un objet simple
4.2 classement équivalent de « tri »
4.3 clé de tri série de sous-clés utilisée pour déterminer un ordre
4.4 delta liste des différences que présente une table de classement par rapport à une autre. Une
table de tri donnée associée à un delta donné forme une nouvelle table de tri. Sauf
mention contraire, le terme « delta » désignera les différences par rapport à la table-
modèle commune définie dans la présente Norme internationale
4.5 élément de poids liste d’un certain nombre de poids ordonnés par niveau
4.6 élément de tri caractère ou une suite de caractères considérés comme une seule entité aux fins du tri
4.7 méthode de comparaison de référence
méthode de détermination de l’ordre relatif de deux clés (cf. la clause 6)
4.8 niveau (de tri) numéro d’une sous-clé dans la série de sous-clés formant une clé
4.9 poids (de tri) entier positif, utilisé dans les sous-clés pour indiquer l’ordre relatif des éléments de tri
4.10 prétraitement
procédé par lequel des chaînes de caractères sont transformées en d’autres chaînes avant
le calcul de la clé de tri de chaque chaîne
4.11 sous-clé suite de poids calculée pour une chaîne de caractères pour un niveau particulier.
4.12 symbole élément de tri
© ISO/CEI 2001 – Tous droits réservés 3

---------------------- Page: 8 ----------------------
ISO/CEI 14651:2001(F)
4.13 symbole de tri symbole utilisé pour préciser les poids attribués à un élément de tri
4.14 table (de poids) de tri
table reliant les éléments de tri aux éléments de poids
4.15 tri procédé par lequel on détermine si de deux chaînes la première est plus petite, égale ou
plus grande que la seconde
5 Symboles et abréviations
Selon l’amendement 9 de l’ISO/CEI 10646-1:1993, les caractères se représentent à l’aide de UXXXX, où chaque
X correspond à un chiffre hexadécimal (lettres en majuscule) et où XXXX est le numéro du caractère dans
l’ISO/CEI 10646-1. Cette convention est reprise dans cette Norme internationale.
Dans la table-modèle commune, des symboles arbitraires représentent des poids selon la notation BNF décrite à
l’article 6.3.1.
6 Comparaison de chaînes
6.1 Prétraitement des chaînes de caractères avant comparaison
Il peut s’avérer nécessaire de transformer les chaînes de caractères avant de leur appliquer la méthode de
comparaison de référence (l’annexe C fournit un exemple d’une telle préparation). Bien que n’étant pas l’objet de la
présente Norme internationale, le prétraitement peut être une partie importante du processus de tri. On consultera
l’annexe C pour des exemples de prétraitement.
S’il y a lieu, une partie importante de la phase préparatoire consiste à transformer les caractères d’un codage
non-JUC à des caractères du JUC fournis en entrée à la méthode de comparaison. Cette transformation peut
comprendre le traitement correct de séquences d’échappement dans le codage original, la transformation de
caractères sans attribution dans le JUC à des positions de code dans la zone privée et la transposition de caractères
dans le cas de chaînes qui ne seraient pas stockées en ordre logique. Par exemple, dans le cas de codages arabes
en ordre visuel, les caractères doivent être mis en ordre logique ; dans le cas de certains codages à usage
bibliographique, les accents combinatoires stockés avant leur caractère de base doivent être déplacés après le
caractère de base. La suite résultante peut devoir être re-transformée dans le codage original.
NOTE 1 : La table-modèle commune est conçue de telle sorte que les séquences combinatoires et les caractères
précomposés correspondants aient exactement le même ordre. Pour éviter de violer cet invariant (et par le fait
même la conformité à Unicode), l’adaptation devrait changer le classement des séquences combinatoires quand le
classement des caractères précomposés correspondant est changé. Par exemple, si Ä est déplacé après Z, alors
le classement de la séquence combinatoire + devrait aussi être changé. Pour éviter de
révéler des différences de codage invisible à l’utilisateur, on recommande de normaliser les chaînes selon
l’algorithme de normalisation Unicode – voir le Unicode Technical Report nº 15 dans la bibliographie.
NOTE 2 : Les séquences d’échappement et les caractères de commande sont très délicats à interpréter ; il est fortement
recommandé de les filtrer ou de les transformer.
NOTE 3 : Puisque la méthode de comparaison de référence est une description logique du procédé de comparaison de
chaînes, rien n’empêche une mise en œuvre de cette méthode d’utiliser exclusivement un codage autre qu’un
codage du JUC, pour autant que les résultats obtenus soient les mêmes que si la méthode de référence était
utilisée.
4 © ISO/CEI 2001 – Tous droits réservés

---------------------- Page: 9 ----------------------
ISO/CEI 14651:2001(F)
6.2 Construction des clés et comparaison
6.2.1. Préliminaires
6.2.1.1. Hypothèses
La table de tri est une transformation des éléments de tri en éléments de poids. Pour chaque élément de poids,
la table-modèle commune définit quatre niveaux. L’adaptation peut augmenter ou réduire ce nombre de niveaux, mais
pas en deçà de trois.
NOTE : Dans la table-modèle commune, les niveaux ont généralement les significations suivantes :
Niveau 1 : ce niveau correspond généralement au jeu de lettres de base pour une écriture alphabétique, au jeu de
caractères courants pour une écriture idéographique ou syllabique.
Niveau 2 : ce niveau correspond généralement aux diacritiques pouvant accompagner les caractères de base de
chaque écriture. En certaines langues, les lettres accentuées sont considérées comme des lettres de base de
l’alphabet et ne sont pas affectées par ce niveau, mais seulement par le premier niveau. En espagnol par exemple,
le N TILDE est considéré comme une lettre de base de l’alphabet latin ; par conséquent, une adaptation pour
l’espagnol changera la définition de N TILDE de « le poids d’un N au premier niveau et le poids d’un TILDE au
second niveau » à « le poids d’un N TILDE (entre N et O) au premier niveau et absence de diacritique au second
niveau ». Dans certains cas, on prend également en compte des variantes de forme au second niveau, par
exemple ß (la LETTRE MINUSCULE LATINE S DUR), qui est équivalente à ss au premier niveau mais s’en
distingue traditionnellement au second niveau.
Niveau 3 : ce niveau est généralement associé aux distinctions de casse (majusules-minuscules) ou aux variantes
de formes (comme la distinction entre hiragana et katakana).
Niveau 4 : ce niveau est généralement consacré aux distinctions plus fines que celles des autres niveaux. Le
dernier niveau (le quatrième dans la table-modèle commune) est souvent utilisé pour donner des poids à des
caractères « spéciaux », c’est à dire des caractères qui ne sont pas normalement utilisés dans l’orthographe des
mots d’une langue (ponctuation, vignettes, etc.), souvent appelés « ignorables » dans le contexte du tri
informatique.
6.2.1.2. Propriétés de traitement
Une table de tri adaptée donnée possède des propriétés spécifiques de balayage et de classement. Ces
propriétés peuvent avoir été changées par l’adaptation.
Une direction de balayage (vers l’avant ou vers l’arrière) pour chaque niveau est utilisée pour indiquer comment
traiter la chaîne. La direction de balayage est une propriété globale de chaque niveau défini dans la table adaptée.
Si le dernier niveau est supérieur à trois, il existe une propriété optionnelle de ce niveau appelée l’option
« position » : lorsque active, une comparaison des positions numériques de chaque caractère « ignorable » dans les
deux chaînes est effectuée, avant de comparer leurs poids. En d’autres mots, si deux chaînes sont équivalentes à
tous les niveaux sauf le dernier, la chaîne contenant un caractère ignorable en position la plus basse est classée
avant l’autre. Si les caractères ignorables ont les mêmes positions, alors leurs poids sont considérés jusqu’à ce
qu’une différence soit trouvée. Le traitement correct de cette propriété optionnelle n’est pas nécessaire à la conformité
à cette Norme.
NOTE : La direction de balayage (vers l’avant ou vers l’arrière) n’est normalement pas reliée à la direction d’écriture. La
direction de balayage s’applique à la suite logique de caractères codés.
Dans le cas d’écritures de droite à gauche comme l’arabe, l’ISO/CEI 10646 prescrit que les premiers caractères en
ordre logique sont ceux apparaissant à droite en ordre de présentation. En écriture latine au contraire, les premiers
caractères en ordre logique apparaissent à gauche en ordre de présentation.
Le balayage vers l’avant commence au début de la séquence en ordre logique, alors que l
...

Questions, Comments and Discussion

Ask us and Technical Secretary will try to provide an answer. You can facilitate discussion about the standard in here.