/
index.html
1787 lines (1723 loc) · 108 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html dir="ltr" lang="en">
<head>
<meta content="text/html; charset=utf-8" http-equiv="content-type">
<title>Character Model for the World Wide Web: String Matching and Searching</title>
<link rel="canonical" href="http://www.w3.org/TR/2015/WD-charmod-norm-20151119/"/>
<!-- local styles. Includes the styles from http://www.w3.org/International/docs/styleguide -->
<link rel="stylesheet" href="local.css" type="text/css">
<script src="http://pandora.aptest.com/w3c/respec-style/builds/respec-w3c-common.js" class="remove"></script>
<!--script src="http://www.w3.org/Tools/respec/respec-w3c-common" async class="remove"></script-->
<script class="remove">
var respecConfig = {
useExperimentalStyles: true,
// specification status (e.g. WD, LCWD, NOTE, etc.). If in doubt use ED.
specStatus: "ED",
//publishDate: "2015-XX-XX",
//previousPublishDate: "2015-11-19",
//previousMaturity: "WD",
noRecTrack: true,
shortName: "charmod-norm",
copyrightStart: "2004",
edDraftURI: "http://w3c.github.io/charmod-norm/",
// lcEnd: "2009-08-05",
// editors, add as many as you like
// only "name" is required
editors: [
{ name: "Addison Phillips",
company: "Invited Expert" },
],
// authors, add as many as you like.
//authors: [
// { name: "Your Name", url: "http://example.org/",
// company: "Your Company", companyURL: "http://example.com/" },
//],
// name of the WG
wg: "Internationalization Working Group",
wgURI: "http://www.w3.org/International/core/",
wgPublicList: "www-international",
bugTracker: { new: "https://github.com/w3c/charmod-norm/issues", open: "https://github.com/w3c/charmod-norm/issues" } ,
otherLinks: [
{
key: "Github",
data: [
{
value: "repository",
href: "https://github.com/w3c/charmod-norm/"
}
]
}
],
// URI of the patent status for this WG, for Rec-track documents
// !!!! IMPORTANT !!!!
// This is important for Rec-track documents, do not copy a patent URI from a random
// document unless you know what you're doing. If in doubt ask your friendly neighbourhood
// Team Contact.
wgPatentURI: "http://www.w3.org/2004/01/pp-impl/32113/status",
localBiblio: {
"UTS18": {
title: "Unicode Technical Standard #18: Unicode Regular Expressions",
href: "http://unicode.org/reports/tr18/",
authors: [ "Mark Davis", "Andy Heninger" ]
},
"Encoding": {
title: "Encoding",
href: "http://www.w3.org/TR/encoding/",
authors: [ "Anne van Kesteren", "Joshua Bell", "Addison Phillips" ]
},
"UTS10": {
title: "Unicode Technical Standard #10: Unicode Collation Algorithm",
href: "http://www.unicode.org/reports/tr10/",
authors: [ "Mark Davis", "Ken Whistler", "Markus Scherer" ]
},
"UAX11": {
title: "Unicode Standard Annex #11: East Asian Width",
href: "http://www.unicode.org/reports/tr11/",
authors: [ "Ken Lunde 小林劍" ]
},
"UTR29": {
title: "Unicode Text Segmentation",
href: "http://www.unicode.org/reports/tr29/",
authors: [ "Mark Davis" ]
},
"UTR36": {
title: "Unicode Technical Report #36: Unicode Security Considerations",
href: "http://www.unicode.org/reports/tr36/",
authors: [ "Mark Davis", "Michel Suignard" ]
},
"UTR50": {
title: "Unicode Technical Report #50: Unicode Vertical Text Layout",
href: "http://www.unicode.org/reports/tr50/",
authors: [ "Koji Ishii 石井宏治" ]
},
"Nicol": {
title: "The Multilingual World Wide Web, Chapter 2: The WWW As A Multilingual Application",
href: "http://www.mind-to-mind.com/i18n/multilingual-www.html",
authors: [ "Gavin Nicol" ]
}
}
};
</script> </head>
<body>
<section id="abstract">
<p>This document builds upon on <cite>Character Model for the World Wide
Web 1.0: Fundamentals </cite>[[!CHARMOD]] to provide authors of
specifications, software developers, and content developers a common
reference on string identity matching on the World Wide Web and thereby
increase interoperability. </p>
</section>
<section id="sotd">
<div class="note">
<p>This version of the document represents a significant change from the
<a href="http://www.w3.org/TR/2012/WD-charmod-norm-20120501/">earlier
editions</a>. Much of the content is changed and the recommendations
are significantly altered. This fact is reflected in a change to the
name of the document from "Character Model: Normalization".</p>
</div>
<div class="note">
<p data-lang="en" style="font-weight: bold; font-size: 120%">Sending
comments on this document</p>
<p data-lang="en">If you wish to make comments regarding this document,
please raise them as <a href="https://github.com/w3c/charmod-norm/issues"
style="font-size: 120%;">github issues</a> against the <a href="http://www.w3.org/TR/2015/WD-charmod-norm-20151119/"
style="font-size: 120%">latest dated version in /TR</a>. Only send
comments by email if you are unable to raise issues on github (see
links below). All comments are welcome.</p>
<p data-lang="en">To make it easier to track comments, please raise
separate issues or emails for each comment, and point to the section
you are commenting on using a URL for the dated version of the
document.</p>
</div>
</section>
<section id="intro">
<h2>Introduction</h2>
<section id="goals">
<h3>Goals and Scope</h3>
<p>The goal of the Character Model for the World Wide Web is to
facilitate use of the Web by all people, regardless of their language,
script, writing system, and cultural conventions, in accordance with
the <a href="http://www.w3.org/Consortium/mission"><cite>W3C goal of
universal access</cite></a>. One basic prerequisite to achieve
this goal is to be able to transmit and process the characters used
around the world in a well-defined and well-understood way.</p>
<p class="note">This document builds on <cite>Character Model for the
World Wide Web: Fundamentals</cite> [[!CHARMOD]]. Understanding the
concepts in that document are important to being able to understand
and apply this document successfully.</p>
<p>This part of the Character Model for the World Wide Web covers string
matching—the process by which a specification or implementation
defines whether two string values are the same or different from one
another. It describes the ways in which texts that are semantically
equivalent can be encoded differently and the impact this has on
matching operations important to formal languages (such as those used
in the formats and protocols that make up the Web). Finally, it
discusses the problem of substring searching within documents.</p>
<p>The main target audience of this specification is W3C specification
developers. This specification and parts of it can be referenced from
other W3C specifications and it defines conformance criteria for W3C
specifications, as well as other specifications.</p>
<p>Other audiences of this specification include software developers,
content developers, and authors of specifications outside the W3C.
Software developers and content developers implement and use W3C
specifications. This specification defines some conformance criteria
for implementations (software) and content that implement and use W3C
specifications. It also helps software developers and content
developers to understand the character-related provisions in W3C
specifications.</p>
<p>The character model described in this specification provides authors
of specifications, software developers, and content developers with a
common reference for consistent, interoperable text manipulation on
the World Wide Web. Working together, these three groups can build a
globally accessible Web.</p>
</section>
<section id="structure">
<h3>Structure of this Document</h3>
<p>This document defines two basic building blocks for the Web related
to this problem. First, it defines rules and processes for String
Identity Matching in document formats. These rules are designed for
the identifiers and structural markup (<a href="#def_syntactic_content" class="termref">syntactic content</a>)
used in document formats to ensure consistent processing of each and
are targeted to Specification writers. Second, it defines broader
guidelines for handling user visible text, such as natural language
text that forms most of the <strong>content</strong> of the Web. This
section is targeted to implementers.</p>
<p>This document is divided into three main sections.</p>
<p>The <a href="#problemStatement">first section</a> lays out the
problems involved in string matching; the effects of Unicode and case
folding on these problems; and outlines the various issues and
normalization mechanisms that might be used to address these issues.</p>
<p>The <a href="#identityMatching">second section</a> provides
requirements and recommendations for string identity matching for use
in <span class="qterm">formal languages</span>, such as many of the
document formats defined in W3C Specifications. This primarily is
concerned with making the Web functional and providing document
authors with consistent results. </p>
<p>The <a href="#searching">third section</a> discusses considerations
for the handling of content by implementations, such as browsers or
text editors on the Web. This mainly is related to how and why to
preserve the author's original sequences and how to search or find
content in natural language text. </p>
</section>
<section id="background">
<h3>Background</h3>
<p>This section provides some historical background on the topics
addressed in this specification.</p>
<p>At the core of the character model is the Universal Character Set
(UCS), defined jointly by the <cite>Unicode Standard</cite>
[[!Unicode]] and ISO/IEC 10646 [[!ISO10646]]. In this document, <dfn>Unicode</dfn>
is used as a synonym for the Universal Character Set. A successful
character model allows Web documents authored in the world's writing
systems, scripts, and languages (and on different platforms) to be
exchanged, read, and searched by the Web's users around the world.</p>
<p>The first few chapters of the <cite>Unicode Standard</cite>
[[!Unicode]] provide useful background reading.</p>
<p>For information about the requirements that informed the development
of important parts of this specification, see <cite>Requirements for
String Identity Matching and String Indexing</cite> [[CHARREQ]].</p>
</section>
<section id="terminology">
<h3>Terminology and Notation</h3>
<p>This section contains terminology and notation specific to this
document.</p>
<p>The Web is built on text-based formats and protocols. In order to
describe string matching or searching effectively, it is necessary to
establish terminology that allows us to talk about the different kinds
of text within a given format or protocol, as the requirements and
details vary significantly. </p>
<p>Unicode code points are denoted as <code class="kw" translate="no">U+hhhh</code>,
where <code class="kw" translate="no">hhhh</code> is a sequence of at
least four, and at most six hexadecimal digits. For example, the
character <span class="qchar">€</span> <span class="uname" translate="no">EURO
SIGN</span> has the code point <span class="uname" translate="no">U+20AC</span>.</p>
<p>Some characters that are used in the various examples might not
appear as intended unless you have the appropriate font. Care has been
taken to ensure that the examples nevertheless remain understandable.</p>
<p>A <dfn data-lt="legacy character encoding|legacy character encodings">legacy
character encoding</dfn> is a character encoding not based on the
Unicode character set.</p>
<p>A <dfn data-lt="transcoder|transcoders">transcoder</dfn> is a process that converts code units (generally bytes) from a <a>legacy character encoding</a>
to a <a href="http://www.w3.org/TR/2005/REC-charmod-20050215/#Unicode_Encoding_Form">Unicode encoding form</a>.</p>
<p><dfn id="def_syntactic_content">Syntactic content</dfn> is any text in a document format or
protocol that belongs to the structure of the format or protocol. This
definition can include values that are not typically thought of as
"markup", such as the name of a field in an HTTP header, as well as
all of the characters that form the structure of a format or protocol.
For example, <span class="qchar"><</span> or <span class="qchar">></span>
are part of the syntactic content in an HTML document. </p>
<p>Syntactic content usually is defined by a specification or specifications and
includes both the defined, reserved keywords for the given protocol or
format as well as string tokens and identifiers that are defined by
document authors to form the structure of the document (rather than
the "content" of the document).</p>
<aside class="example">
<p><cite>XML</cite> [[XML10]] defines specific elements, attributes,
and values that are reserved across all XML documents. Thus, the
word <code class="kw" translate="no">encoding</code> has a defined
meaning inside the XML document declaration: it is a reserved name.
XML also allows a user to define elements and attributes for a given
document using a DTD. In a document that uses a DTD that defines an
element called <code class="kw"><muffin></code>, <span class="qterm">muffin</span>
is a part of the syntactic content.</p>
</aside>
<p><dfn>Natural language content</dfn> refers to the language-bearing
content in a document and <b>not</b> to any of the surrounding syntactic content
or identifiers that form part of the document structure. You can think
of it as the actual "content" of the document or the "message" in a
given protocol. Note that the natural language content can include
items such as the document title as well as prose content within the
document.</p>
<p>A <dfn data-lt="resource|resources">resource</dfn> is a given
document, file, or protocol "message" which includes both the <a>natural
language content</a> as well as the <a href="#def_syntactic_content" class="termref">syntactic content</a>
such as identifiers surrounding or containing it. For example, in an
HTML document that also has some CSS and a few <code class="kw" translate="no">script</code>
tags with embedded JavaScript, the entire HTML document, considered as
a file, is the resource.</p>
<p>A <dfn id="def_vocabulary">vocabulary</dfn> provides the list of
reserved names as well as the set of rules and specifications
controlling how user values (such as identifiers) can be assigned in a
format or protocol. This can include restrictions on range, order, or
type of characters that can appear in different places. For example,
HTML defines the names of its elements and attributes, as well as
enumerated attribute values, which defines the "vocabulary" of HTML
<a href="#def_syntactic_content" class="termref">syntactic content</a>. ECMAScript restricts the range of characters that can appear
at the start or in the body of an identifier or variable name (while
different rules apply to the values of, say, string literals).</p>
<p>A <dfn data-lt="grapheme|graphemes">grapheme</dfn> is a sequence of
one or more Unicode characters in a visual representation of some text
that a typical user would perceive as being a single unit (<q>character</q>).
Graphemes are important for a number of text operations such as
sorting or text selection, so it is necessary to be able to compute
the boundaries between each user-perceived character. Unicode defines
the default mechanism for computing graphemes in <cite>Unicode
Standard Annex #29: Text Segmentation</cite> [[!UTR29]] and calls
this approximation a <dfn>grapheme cluster</dfn>. There are two types
of default grapheme cluster defined. Unless otherwise noted, grapheme
cluster in this document refers to an extended default grapheme
cluster. (A discussion of grapheme clusters is also given at the end
of Section 2.10 of the <cite>Unicode Standard</cite>, [[!Unicode]].)</p>
<p>Because different natural languages have different needs, grapheme clusters
can also sometimes require tailoring. For example, a Slovak user might
wish to treat the default pair of grapheme clusters "ch" as a single
grapheme cluster. Note that the interaction between the language of
string content and the end-user's preferences might be complex.</p>
<aside class="example">
<p>The Hindi word for Unicode <q>यूनिकोड</q> is composed of a
sequence of seven Unicode characters from the Devanagari script (<span
class="uname" translate="no">U+092F U+0942 U+0928 U+093F U+0915
U+094B U+0921</span>). However, most users would identify this
word as containing four units of text—यू, नि, को, and ड. Each of the
first three graphemes consists of two characters: a syllable and a
modifying vowel character. So the word contains seven Unicode
characters, but only four graphemes.</p>
</aside>
<section>
<h5>Terminology Examples</h5>
<p>This section illustrates some of the terminology defined above.</p>
<div style="background-color:white;text-align: left; border-style: solid; border-width:3px; padding-left: 50px; padding-right: 50px; padding-top: 10px; width: 80%">
<p> <span class="markup"><<span class="vocabulary">html</span> <span class="vocabulary">lang</span>="en" <span class="vocabulary">dir</span>="<span class="vocabulary">ltr</span>"><br>
<<span class="vocabulary">head</span>></span></p>
<p><span class="markup"> <<span class="vocabulary">meta</span> <span class="vocabulary">charset</span>="UTF-8"><br>
<<span class="vocabulary">title</span>></span><span class="shakespeare">Shakespeare</span><span
class="markup"></<span class="vocabulary">title</span>><br>
</<span class="vocabulary">head</span>><br>
<<span class="vocabulary">body</span>><br>
<<span class="vocabulary">img</span> <span class="vocabulary">src</span>="<span class="userValue">shakespeare.jpg</span>"
<span class="vocabulary">alt</span>="<span class="userValue"><span class="shakespeare">William
Shakespeare</span></span>" <span class="vocabulary">id</span>="<span class="userValue">shakespeare_image</span>"><br>
<br>
<<span class="vocabulary">p</span>></span><span class="shakespeare">What<span
class="markup">&#x2019;</span>s in a name? That which we
call a rose by any other name would smell as sweet.</span><span
class="markup"></<span class="vocabulary">p</span>><br>
</<span class="vocabulary">body</span>><br>
</<span class="vocabulary">html</span>></span> </p>
</div>
<ul style="text-align:left">
<li>Everything inside the black rectangle (that is, in this HTML file)
is part of the resource.</li>
<li><a>Syntactic content</a> is shown in a <span class="markup">monospaced font</span>.</li>
<li><a>Natural language content</a> is shown in a <span class="shakespeare">bold
blue font with a gray background</span>.</li>
<li>User values are shown in <span class="userValue">italics</span>.</li>
<li><a>Vocabulary</a> is shown with <span class="vocabulary">red underlining</span>.</li>
<li>All of the text above (all text in a text file) makes up a
resource. It's possible that a given resource will contain no
natural language content at all (consider an HTML document
consisting of four empty <code>div</code> elements styled to be
orange rectangles). It's also possible that a resource will contain
<em>no</em> syntactic content and consist solely of natural language content:
for example, a plain text file with a soliloquy from <cite>Hamlet</cite>
in it. Notice too that the HTML entity <code>&#x2019;</code>
appears in the natural language content and belongs to both the
natural language content and the syntactic content in this resource.</li>
</ul>
</section>
</section>
<section id="conformance">
<h4>Conformance</h4>
<p>This specification places conformance criteria on specifications, on
software (implementations) and on Web content. To aid the reader, all
conformance criteria are preceded by <span class="qterm">[X]</span>
where <span class="qchar">X</span> is one of <span class="qchar">S</span>
for specifications, <span class="qchar">I</span> for software
implementations, and <span class="qchar">C</span> for Web content.
These markers indicate the relevance of the conformance criteria and
allow the reader to quickly locate relevant conformance criteria by
searching through this document.</p>
<p>Specifications conform to this document if they:</p>
<ol type="1">
<li>
<p> do not violate any conformance criteria preceded by [S] where
the imperative is MUST or MUST NOT,</p>
</li>
<li>
<p>document the reason for any deviation from criteria where the
imperative is <span class="rfc2119">SHOULD</span>, <span class="rfc2119">SHOULD
NOT</span>, or <span class="rfc2119">RECOMMENDED</span>,</p>
</li>
<li>
<p> make it a conformance requirement for implementations to conform
to this document,</p>
</li>
<li>
<p> make it a conformance requirement for content to conform to this
document.</p>
</li>
</ol>
<p>Software conforms to this document if it does not violate any
conformance criteria preceded by [I].</p>
<p>Content conforms to this document if it does not violate any
conformance criteria preceded by [C].</p>
<div class="note">
<p><span class="note-head">NOTE: </span>Requirements placed on
specifications might indirectly cause requirements to be placed on
implementations or content that claim to conform to those
specifications.</p>
</div>
<p>Where this specification contains a procedural description, it is to
be understood as a way to specify the desired external behavior.
Implementations can use other means of achieving the same results, as
long as observable behavior is not affected.</p>
</section>
</section>
<section id="problemStatement">
<h2>The String Matching Problem</h2>
<p>The Web is primarily made up of document formats and protocols based on
character data. These formats or protocols can be viewed as a set of
text files (<a data-lt="resource">resources</a>) that include some form
of structural markup or syntactic content. Processing such syntactic content or document data requires
string-based operations such as matching, indexing, searching, sorting,
regular expression matching, and so forth. As a result, the Web is
sensitive to the different ways in which text might be represented in a
document. Failing to consider the different ways in which the same text
can be represented can confuse users or cause unexpected or frustrating
results.</p>
<section id="definitionCaseFolding">
<h3>Case Folding</h3>
<p>Some scripts and writing systems make a distinction between UPPER,
lower, and Title case characters. Most scripts, such as the Brahmic
scripts of India, the Arabic script, and the non-Latin scripts used to
write Chinese, Japanese, or Korean do not have a case distinction, but
some important ones do. Examples of such scripts include the Latin
script used in the majority of this document, as well as scripts such
as Greek, Armenian, or Cyrillic. </p>
<p>Some document formats or protocols seek to aid interoperability or
provide an aid to content authors by ignoring case variations in the
<a data-lt="vocabulary">vocabulary</a> they define or in user-defined values permitted by the
format or protocol. For example, this occurs when matching class names
between an HTML document and its associated style sheet. Consider this
HTML fragment: </p>
<aside class="example">
<pre><style type="text/css">
SPAN.h\e9llo {
text-decoration: underline;
}
</style>
<span class="h&#xe9;llo">Hello World!</span>
</pre>
</aside>
<p>The <code class="kw" translate="no">SPAN</code> in the stylesheet
matches the <code class="kw" translate="no">span</code> element in
the document, even though one is uppercase and the other is not.</p>
<p><dfn>Case folding</dfn> is the process of making two texts identical
which differ in case but are otherwise "the same".</p>
<p>Case folding might, at first, appear simple. However there are
variations that need to be considered when treating the full range of
Unicode in diverse languages. For more information,
<cite>[[!Unicode]]</cite> Section 5.18 discusses case folding in detail.</p>
<p>Unicode defines the default case fold mapping for each Unicode code point.
Since most scripts do not provide a case distinction, most Unicode code
points do not require a case fold mapping. For those characters that
have a case fold mapping, the majority have a simple, straight-forward
mapping to a single matching (generally lowercase) code point. Unicode
calls these the <code class="kw">common</code> case fold mappings, as they are shared by
Unicode's case fold mappings.
</p>
<p>In addition to the <code class="kw">common</code> case folding mappings, a few characters
have a case fold mapping that would normally require more than one
Unicode character. These are called the <code class="kw">full</code> case fold mappings.
Together with the <code class="kw">common</code> case fold mappings, these provide the
default case fold mapping for all of Unicode. This case fold mapping is referred to in this
document as <dfn id="dfn-UnicodeC+F">Unicode C+F</dfn>.
</p>
<p>Because some applications cannot allocate additional storage when
performaing a case fold operation, Unicode provides a <code class="kw">simple</code> case
fold mapping that maps characters that would normally map to more or
fewer code points to use a single code point for comparison purposes
instead. Unlike the full mapping, this mapping invariably alters the
content (and potentially the meaning) of the text. This <code class="kw">simple</code> case fold mapping, referred to in this document
as <dfn id="UnicodeC+S">Unicode C+S</dfn>, is not appropriate for the Web. </p>
<aside class="example">
<p>One well-known example of a 'full' case fold mapping is the character <span class="qchar">ß</span>
<span class="uname" translate="no">U+00DF LATIN SMALL LETTER SHARP S</span>, a letter that is commonly
used in the German language. The 'full' mapping of this character is to two ASCII letters 's'.
There is no 'simple' mapping for this letter. </p>
<p>Other examples can
be found in the Greek script, where several precomposed characters have multi-character
case fold mappings. For example, consider the character <code>U+1F9B</code> (<span class="uname" translate="no">GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA AND
PROSGEGRAMMENI</span>). This character has both a <code class="kw">full</code> and <code class="kw">simple</code> mapping:</p>
<table style="width: 100%">
<tr>
<th>Source</th>
<th>Full</th>
<th>Simple</th>
<th>Comments</th>
</tr>
<tr>
<td>ᾛ <code class="kw">U+1F9B</code></td>
<td>ἣι <code class="kw">U+1F23 U+03B9</code></td>
<td>ᾓ <code class="kw">U+1F93</code></td>
<td><span class="uname">GREEK SMALL LETTER ETA WITH DASIA AND VARIA</span> + <span class="uname">GREEK SMALL LETTER IOTA</span><br>
<em>versus</em> <span class="uname" translate="no">GREEK SMALL LETTER ETA WITH DASIA AND VARIA AND YPOGEGRAMMENI</span></td>
</tr>
</table>
</aside>
<p>Note that case folding removes information from a string which cannot
be recovered later. </p>
<p>Another aspect of case folding is that it can be language sensitive.
Unicode defines default case mappings for each encoded character, but
these are only defaults and are not appropriate in all cases. Some
languages need case-folding to be tailored to meet specific linguistic
needs. One common example of this are Turkic languages written in the
Latin script.</p>
<aside class="example">
<p>The name of the second largest city in Turkey is "<code>Diyarbakır</code>", which
contains both the dotted and dotless
letters <span class="qchar">i</span>. When rendered into upper
case, this word appears like this: <span class="qterm"><code>DİYARBAKIR</code></span>.
Notice that the ASCII letter <span class="qchar">i</span> maps to <span
class="uname" translate="no">U+0130 LATIN CAPITAL LETTER I WITH
DOT ABOVE</span>, while the letter <span class="qchar">ı</span> (<span
class="uname" translate="no">U+0131 LATIN SMALL LETTER DOTLESS I</span>)
maps to the ASCII uppercase <span class="qchar">I</span>. </p>
</aside>
<p>Sometimes case can vary in a way that is not semantically meaningful
or is not fully under the user's control. This is particularly true
when <a href="#searching">searching</a> a document, but also applies
when defining rules for matching user- or content-generated values,
such as identifiers. In these situations, case-<em>in</em>sensitive
matching might be desirable instead.</p>
<p>When defining a <a>vocabulary</a>, one important consideration is
whether the values are restricted to the ASCII subset of Unicode or if
the vocabulary permits the use of characters (such as accents on Latin
letters or a broad range of Unicode including non-Latin scripts) that
potentially have more complex case folding requirements.
To address these different requirements, there are four types of casefold matching defined by this document for the purposes of
string identity matching in document formats or protocols:
<p><dfn data-lt="case-sensitive">Case sensitive matching</dfn>: code
points are compared directly with no case folding.</p>
<p><dfn data-lt="ASCII case-insensitive">ASCII case-insensitive matching</dfn>
compares a sequence of code points as if all ASCII code points in the
range 0x41 to 0x5A (A to Z) were mapped to the corresponding code
points in the range 0x61 to 0x7A (a to z). When a vocabulary is itself
constrained to ASCII, ASCII case-insensitive matching can be required.
</p>
<p id="uci"><dfn data-lt="Unicode case-insensitive">Unicode
case-insensitive matching</dfn> compares a sequence of code points
as if the Unicode C+F Unicode-defined language-independent default case
folding form mentioned above had been applied to both input sequences.</p>
<p><dfn>Language-sensitive case-sensitive matching</dfn> is useful in
the rare case where a document format or protocol contains information
about the language of the syntactic content and where language-sensitive case
folding might sensibly be applied. <span class="requirement">In these
cases, tailoring of the Unicode case-fold mappings above to match
the expectations of that language SHOULD be specified and applied.</span>
These case-fold mappings are defined in the <cite>Common Locale Data
Repository</cite> [[UAX35]] project of the Unicode Consortium.</p>
</section>
<section id="unicodeNormalization">
<h3>Unicode Normalization</h3>
<p>Other kinds of variations can occur in Unicode text: some <a data-lt="grapheme">graphemes</a>
can be represented by several different Unicode code point sequences.
Consider the character Ǻ <span class="uname" translate="no"> U+01FA
LATIN LETTER CAPITAL A WITH RING ABOVE AND ACUTE</span>. Here are
some of the different character sequences that an HTML document could
use to represent this character:</p>
<ul class="dropExampleList">
<li class="dropExampleItem"><span class="dropExample">Ǻ</span> <span class="uname" translate="no">U+01FA</span>—A "precomposed" character.</li>
<li class="dropExampleItem"><span class="dropExample">Ǻ</span><span
class="uname" translate="no">A + U+030A + U+0301</span>—
A <span class="qterm">base</span> letter <span class="qchar">A</span>
followed by two combining marks (<span class="uname" translate="no">U+030A
COMBINING RING ABOVE</span> and <span class="uname" translate="no">U+0301
COMBINING ACUTE ACCENT</span>)</li>
<li class="dropExampleItem"><span class="dropExample">Ǻ</span><span class="uname"
translate="no">U+00C5 + U+0301</span>—An accented letter (<span class="uname"
translate="no">U+00C5 LATIN CAPITAL LETTER A WITH RING ABOVE</span>)
followed by a combining accent (<span class="uname" translate="no">U+0301
COMBINING ACUTE ACCENT</span>)</li>
<li class="dropExampleItem"><span class="dropExample">Ǻ</span><span class="uname"
translate="no">U+212B + U+0301</span>—A compatibility character (<span
class="uname" translate="no">U+212B ANGSTROM SIGN</span>) followed
by a combining accent (<span class="uname" translate="no">U+0301
COMBINING ACUTE ACCENT</span>)</li>
<li class="dropExampleItem"><span class="dropExample">Ǻ</span><span
class="uname" translate="no">U+FF21 + U+030A + U+0301</span>— A
compatibility character <span class="uname" translate="no">U+FF21
FULLWIDTH LATIN LETTER CAPITAL A</span>) followed by two combining
marks (<span class="uname" translate="no">U+030A COMBINING RING
ABOVE</span> and <span class="uname" translate="no">U+0301
COMBINING ACUTE ACCENT</span>)</li>
</ul>
<p>Each of the above strings contains the same apparent
<span class="quote">meaning</span> as <span class="qchar">Ǻ</span> (<span class="uname" translate="no">U+01FA
LATIN CAPITAL LETTER A WITH RING ABOVE AND ACUTE</span>), but each
one is encoded slightly differently. More variations are possible,
but are omitted for brevity.</p>
<p>Because applications need to find the semantic equivalence in texts
that use different code point sequences, Unicode defines a means of
making two semantically equivalent texts identical: the Unicode
Normalization Forms [[!UAX15]].</p>
<p><a data-lt="resource">Resources</a> are often susceptible to the
effects of these variations because their specifications and
implementations on the Web do not require Unicode Normalization of the
text, nor do they take into consideration the string matching
algorithms used when processing the syntactic content and natural language content later. For this
reason, content developers need to ensure that they have provided a
consistent representation in order to avoid problems later.</p>
<p>However, it can be difficult for users to assure that a given <a data-lt="resource">resource</a>
or set of resources uses a consistent textual representation because
the differences are usually not visible when viewed as text. Tools and
implementations thus need to consider the difficulties experienced by
users when visually or logically equivalent strings that "ought to"
match (in the user's mind) are considered to be distinct values.
Providing a means for users to see these differences and/or normalize
them as appropriate makes it possible for end users to avoid failures
that spring from invisible differences in their source documents. For
example, the W3C Validator warns when an HTML document is not fully in
Unicode Normalization Form C.</p>
<section id="canonical_compatibility">
<h4>Canonical vs. Compatibility Equivalence</h4>
<p>Unicode defines two types of equivalence between characters: <em>canonical
equivalence</em> and <em>compatibility equivalence</em>.</p>
<p><dfn>Canonical equivalence</dfn> is a fundamental equivalency
between Unicode characters or sequences of Unicode characters that
represent the same abstract character. When correctly displayed,
these should always have the same visual appearance and behavior.
Generally speaking, two canonically equivalent Unicode texts should
be considered to be identical as text. Canonical decomposition
removes these primary distinctions between two texts.</p>
<p>Examples of canonical equivalence defined by Unicode include:</p>
<ul class="dropExampleList">
<li class="dropExampleItem"><span class="dropExample">Ç<span style="font-size:75%">
vs.</span>Ç</span> <em>Precomposed versus combining
sequences.</em> Some characters can be composed from a base
character followed by one or more combining characters. The same
characters are sometimes also encoded as a distinct "precomposed"
character. In this example, the character <span class="qchar">Ç</span>
<span class="uname" translate="no">U+00C7</span> is canonically
equivalent to the base character <span class="qchar">C</span> <span
class="uname" translate="no">U+0043</span> followed by the
combining cedilla character <span class="qchar">̧</span> <span class="uname"
translate="no">U+0327</span>. Such equivalence can extend to
characters with multiple combining marks.</li>
<li class="dropExampleItem"><span class="dropExample">q̣̇<span style="font-size:75%">
vs.</span>q̣̇</span> <em>Order of combining marks.</em> When
a base character is modified by multiple combining marks, the
order of the combining marks might not represent a distinct
character. Here the sequence <span class="qterm">q̣̇</span>(<span
class="uname" translate="no">U+0071 U+0323 U+0307</span>) and <span
class="qterm">q̣̇</span>(<span class="uname" translate="no">U+0071
U+0307 U+0323</span>) are equivalent, even though the combining
marks are in a different order. Note that this example is chosen
carefully: the dot-above character and dot-below character are on
opposite "sides" of the base character. The order of combining
diacritics on the same side have a positional meaning.</li>
<li class="dropExampleItem"><span class="dropExample">Ω<span style="font-size:75%">
vs.</span>Ω</span> <em>Singleton mappings.</em> These result
from the need to separately encode otherwise equivalent characters
to support legacy character encodings. In this example, the Ohm
symbol <span class="qchar">Ω</span> <span class="uname" translate="no">U+2126</span>
is canonically equivalent (and identical in appearance) to the
Greek letter Omega <span class="qchar">Ω</span> <span class="uname"
translate="no">U+03A9</span>.</li>
<li class="dropExampleItem"><span class="dropExample">가<span style="font-size:75%">
vs.</span>가</span> <em>Hangul.</em> The Hangul script is
used to write the Korean language. This script is constructed
logically, with each syllable being a roughly-square <a>grapheme</a>
formed from specific sub-parts that represent consonants and
vowels. These specific sub-parts, called <em>jamo</em>, are
encoded in Unicode. So too are the precomposed syllables. Thus the
syllable <span class="qchar">가</span> <span class="uname"
translate="no">U+AC00</span> is canonically equivalent to its
constituent <em>jamo</em> characters <span class="qchar">ᄀ</span> <span
class="uname" translate="no">U+1100</span> and <span class="qchar">ᅡ</span> <span
class="uname" translate="no">U+1161</span>.</li>
</ul>
<p><dfn>Compatibility equivalence</dfn> is a weaker equivalence
between characters or sequences of characters that represent the
same abstract character, but may have a different visual appearance
or behavior. Generally a compatibility decomposition removes
formatting variations, such as superscript, subscript, rotated,
circled, and so forth, but other variations also occur. In many
cases, characters with compatibility decompositions represent a
distinction of a semantic nature; replacing the use of distinct
characters with their compatibility decomposition can therefore
cause problems and texts that are equivalent after compatibility
decomposition often were not perceived as being identical beforehand
and usually should not be treated as equivalent by a formal
language.</p>
<p>The following table illustrates various kinds of compatibility
equivalence in Unicode:</p>
<table class="data">
<thead>
<tr>
<th colspan="5">Compatibility Equivalance</th>
</tr>
</thead>
<tbody>
<tr>
<td class="long"><strong>Font variants</strong>—characters that have a
specific visual appearance (generally associated with a
specialized use, such as in mathematics).</td>
<td style="text-align: center" colspan="2"> <span class="sampleCharacter">ℌ</span></td>
<td style="text-align: center" colspan="2"> <span class="sampleCharacter">ℍ</span></td>
</tr>
<tr>
<td class="long"><strong>Breaking versus non-breaking</strong>—variations
in breaking or joining rules, such as the difference
between a <span class="qterm">normal</span> and a
non-breaking space.</td>
<td style="text-align: center" colspan="4"><span class="uname"
translate="no">U+00A0 NON-BREAKING SPACE</span></td>
</tr>
<tr>
<td class="long"><strong>Presentation forms of Arabic</strong>—
characters that encode the specific shapes (initial,
medial, final, isolated) needed by visual legacy encodings
of the Arabic script.</td>
<td style="text-align: center"> <span class="sampleCharacter">ﻨ</span></td>
<td style="text-align: center"> <span class="sampleCharacter">ﻧ</span></td>
<td style="text-align: center"> <span class="sampleCharacter">ﻦ</span></td>
<td style="text-align: center"> <span class="sampleCharacter">ﻥ</span></td>
</tr>
<tr>
<td class="long"><strong>Circled</strong>—numbers, letters, and other
characters in a circled, bullet, or other presentational
form; often used for lists, footnotes, and specialized
presentation</td>
<td style="text-align: center" colspan="1"> <span class="sampleCharacter">①</span></td>
<td style="text-align: center" colspan="1"> <span class="sampleCharacter">❿</span></td>
<td style="text-align: center" colspan="1"> <span class="sampleCharacter">㉄</span></td>
<td style="text-align: center" colspan="1"> <span class="sampleCharacter">㊞</span></td>
</tr>
<tr>
<td class="long"><strong>Width variation, size, rotated presentation
forms</strong>—narrow vs. wide presentational forms of
characters (such as those associated with legacy
multibyte encodings), as well as "rotated" presentation
forms necessary for vertical text.</td>
<td style="text-align: center"><span class="sampleCharacter">カ</span></td>
<td style="text-align: center"><span class="sampleCharacter">カ</span></td>
<td style="text-align: center"><span class="sampleCharacter">︷</span></td>
<td style="text-align: center"><span class="sampleCharacter">{</span></td>
</tr>
<tr>
<td class="long"><strong>Superscripts/subscripts</strong>—superscript or
subscript letters, numbers, and symbols.</td>
<td style="text-align: center"> <span class="sampleCharacter">⁹</span></td>
<td style="text-align: center"> <span class="sampleCharacter">₉</span></td>
<td style="text-align: center"> <span class="sampleCharacter">ª</span></td>
<td style="text-align: center"> <span class="sampleCharacter">₊</span></td>
</tr>
<tr>
<td class="long"><strong><span class="quote">Squared</span> characters</strong>—East
Asian (particularly kana) sequences encoded as a
presentation form to fit in a single ideographic "cell" in
text.</td>
<td style="text-align: center"> <span class="sampleCharacter">㌀</span></td>
<td style="text-align: center"> <span class="sampleCharacter">㍐</span></td>
<td style="text-align: center"> <span class="sampleCharacter">🄠</span></td>
<td style="text-align: center"> <span class="sampleCharacter">㎉</span></td>
</tr>
<tr>
<td class="long"><strong>Fractions</strong>—precomposed vulgar fractions,
often encoded for compatibility with font glyph sets.</td>
<td style="text-align: center"> <span class="sampleCharacter">¼</span></td>
<td style="text-align: center"> <span class="sampleCharacter">½</span></td>
<td style="text-align: center"> <span class="sampleCharacter">⅟</span></td>
<td style="text-align: center"> <span class="sampleCharacter">↉</span></td>
</tr>
<tr>
<td class="long"><strong>Others</strong>—compatibility characters encoded
for other reasons, generally for compatibility with legacy
character encodings. Many of these characters are simply a
sequence of characters encoded as a single presentational
unit.</td>
<td style="text-align: center"> <span class="sampleCharacter">dž</span></td>
<td style="text-align: center"> <span class="sampleCharacter">⑴</span></td>
<td style="text-align: center"> <span class="sampleCharacter">⒈</span></td>
<td style="text-align: center"> <span class="sampleCharacter">⻳</span></td>
</tr>
</tbody>
</table>
<p>In the above table, it is important to note that the characters
illustrated are <em>actual Unicode codepoints</em>. They were
encoded into Unicode for compatibility with various legacy character
encodings. They should not be confused with the normal kinds of
presentational processing used on their non-compatibility
counterparts.</p>
<p>For example, most Arabic-script text uses the characters in the
Arabic script block of Unicode (starting at <span class="uname" translate="no">U+0600</span>).
The actual glyphs used to display the text are selected using fonts
and text processing logic based on the position inside a word
(initial, medial, final, or isolated), in a process called
"shaping". In the table above, the four presentation forms of the
Arabic letter <span class="uname" translate="no">NOON</span> are
shown. The characters shown are compatibility characters in the <span
class="uname" translate="no">U+FE00</span> block, each of which
represents a specific "positional" shape and each of the four code
points shown have a compatibility decomposition to the <span class="quote">regular</span>
Arabic letter <span class="uname" translate="no">U+0646 NOON</span>.</p>
<p>Similarly, the variations in half-width and full-width forms and rotated
characters (for use in vertical text) are encoded as separate code
points, mainly for compatibility with legacy character encodings. In
many cases these variations are associated with the Unicode properties
described in <cite>East Asian Width</cite> [[UAX11]]. See also <cite>Unicode
Vertical Text Layout</cite> [[UTR50]] for a discussion of vertical text
presentation forms.</p>
<p>In the case of characters with compatibility decompositions, such
as those shown above, the <span class="qchar">K</span> Unicode
Normalization forms convert the text to the "normal" or "expected"
Unicode code point. But the existence of these compatibility
characters cannot be taken to imply that similar appearance
variations produced in the normal course of text layout and
presentation are affected by Unicode Normalization. They are not.</p>
</section>
<section id="composition_decomposition">
<h4>Composition vs. Decomposition</h4>
<p>These two types of Unicode-defined equivalence are then grouped by
another pair of variations: "decomposition" and "composition". In
"decomposition", separable logical parts of a visual character are
broken out into a sequence of base characters and combining marks
and the resulting code points are put into a fixed, canonical order.
In "composition", the decomposition is performed and then any
combining marks are recombined, if possible, with their base
characters. Note that this does <strong>not</strong> mean that all
of the combining marks have been removed from the resulting
normalized text. </p>
<div class="note">
<p>Roughly speaking, <abbr title="Normalization Form C">NFC</abbr>
is defined such that each combining character sequence (a base
character followed by one or more combining characters) is
replaced, as far as possible, by a canonically equivalent
precomposed character. Text in a Unicode character encoding form
(such as UTF-8 or UTF-16) is said to be in NFC if it doesn't
contain any combining sequence that could be replaced with a
precomposed character and if any remaining combining sequence is
in canonical order.</p>
</div>
</section>
<section id="normalization_forms">
<h4>Unicode Normalization Forms</h4>
<p>The Unicode Normalization Forms are named using letter codes, with
'C' standing for Composition, 'D' for Decomposition, and 'K' for
Compatibility decomposition. Having converted a resource to a
sequence of Unicode characters and unescaped any escape sequences,
we can finally "normalize" the Unicode texts given in the example
above. Here are the resulting sequences in each Unicode
Normalization form for the U+01FA example given earlier: </p>
<figure>
<div>
<table class="data">
<thead>
<tr>
<th>Original Codepoints</th>
<th>NFC</th>
<th>NFD</th>
<th>NFKC</th>
<th>NFKD</th>
</tr>
</thead>
<tbody>
<tr>
<td class="b-clear">Ǻ<br>
<span class="tableSub">U+01FA</span></td>
<td class="b1">Ǻ<br>
<span class="tableSub">U+01FA</span></td>
<td class="b2">Ǻ<br>
<span class="tableSub">U+0041 U+030A U+0301</span></td>
<td class="b1">Ǻ<br>
<span class="tableSub">U+01FA</span></td>
<td class="b2">Ǻ<br>
<span class="tableSub">U+0041 U+030A U+0301</span></td>
</tr>
<tr>
<td class="b-clear">Ǻ<br>
<span class="tableSub">U+00C5 U+0301</span></td>
<td class="b1">Ǻ<br>
<span class="tableSub">U+01FA</span></td>
<td class="b2">Ǻ<br>
<span class="tableSub">U+0041 U+030A U+0301</span></td>
<td class="b1">Ǻ<br>
<span class="tableSub">U+01FA</span></td>
<td class="b2">Ǻ<br>
<span class="tableSub">U+0041 U+030A U+0301</span></td>
</tr>
<tr>
<td class="b-clear">Ǻ<br>
<span class="tableSub">U+212B U+0301</span></td>
<td class="b1">Ǻ<br>
<span class="tableSub">U+01FA</span></td>
<td class="b2">Ǻ<br>
<span class="tableSub">U+0041 U+030A U+0301</span></td>
<td class="b1">Ǻ<br>
<span class="tableSub">U+01FA</span></td>
<td class="b2">Ǻ<br>
<span class="tableSub">U+0041 U+030A U+0301</span></td>
</tr>
<tr>
<td class="b-clear">Ǻ<br>
<span class="tableSub">U+0041 U+030A U+0301</span></td>
<td class="b1">Ǻ<br>
<span class="tableSub">U+01FA</span></td>
<td class="b2">Ǻ<br>
<span class="tableSub"> U+0041 U+030A U+0301</span></td>
<td class="b1">Ǻ<br>
<span class="tableSub">U+01FA</span></td>
<td class="b2">Ǻ<br>
<span class="tableSub">U+0041 U+030A U+0301</span></td>
</tr>
<tr>
<td class="b-clear">Ǻ<br>
<span class="tableSub">U+FF21 U+030A U+0301</span></td>
<td class="b3">Ǻ<br>
<span class="tableSub">U+FF21 U+030A U+0301</span></td>
<td class="b3">Ǻ<br>
<span class="tableSub"> U+FF21 U+030A U+0301</span></td>
<td class="b1">Ǻ<br>
<span class="tableSub">U+01FA</span></td>
<td class="b2">Ǻ<br>
<span class="tableSub">U+0041 U+030A U+0301</span></td>
</tr>
</tbody>
</table>
</div>
<figcaption>Comparison of Unicode Normalization Forms</figcaption> </figure>
<p>Unicode Normalization reduces these (and other potential sequences
of escapes representing the same character) to just three possible
variations. However, Unicode Normalization doesn't remove all
textual distinctions and sometimes the application of Unicode
Normalization can remove meaning that is distinctive or meaningful
in a given context. For example: </p>
<ul>
<li>Not all compatibility characters have a compatibility
decomposition.</li>
<li>Some characters that look alike or have similar semantics are
actually distinct in Unicode and don't have canonical or
compatibility decompositions to link them together. For example, <span
class="qchar">。</span> <span class="uname" translate="no">U+3002
IDEOGRAPHIC FULL STOP</span> is used as a <span class="quote">period</span>
at the end of sentences in languages such as Chinese or Japanese.
However, it is not considered equivalent to the ASCII <span class="quote">period</span>
character <span class="uname" translate="no">U+002E FULL STOP</span>.</li>
<li>Some character variations are not handled by the Unicode
Normalization Forms. For example, UPPER, Title, and lowercase
variations are a separate and distinct textual variation that must
be separately handled when comparing text.</li>
<li>Normalization can remove meaning. For example, the character
sequence <span class="qterm"><samp>8½</samp></span> (including
the character <span class="uname" translate="no">U+00BD VULGAR
FRACTION ONE HALF</span>), when normalized using one of the <span
class="quote">compatibility</span> normalization forms (that is,
NFKD or NFKC), becomes an ASCII character sequence that looks
like: <samp>81/2</samp>.</li>
</ul>
</section>
</section>