Neither is 0xff illegal UTF-EBCDIC since it's the last C1.
[p5sagit/p5-mst-13.2.git] / pod / perlunicode.pod
CommitLineData
393fec97 1=head1 NAME
2
3perlunicode - Unicode support in Perl
4
5=head1 DESCRIPTION
6
0a1f2d14 7=head2 Important Caveats
21bad921 8
776f8809 9WARNING: While the implementation of Unicode support in Perl is now
10fairly complete it is still evolving to some extent.
21bad921 11
75daf61c 12In particular the way Unicode is handled on EBCDIC platforms is still
13rather experimental. On such a platform references to UTF-8 encoding
14in this document and elsewhere should be read as meaning UTF-EBCDIC as
15specified in Unicode Technical Report 16 unless ASCII vs EBCDIC issues
16are specifically discussed. There is no C<utfebcdic> pragma or
17":utfebcdic" layer, rather "utf8" and ":utf8" are re-used to mean
18platform's "natural" 8-bit encoding of Unicode. See L<perlebcdic> for
19more discussion of the issues.
0a1f2d14 20
21The following areas are still under development.
21bad921 22
13a2d996 23=over 4
21bad921 24
25=item Input and Output Disciplines
26
75daf61c 27A filehandle can be marked as containing perl's internal Unicode
28encoding (UTF-8 or UTF-EBCDIC) by opening it with the ":utf8" layer.
0a1f2d14 29Other encodings can be converted to perl's encoding on input, or from
75daf61c 30perl's encoding on output by use of the ":encoding()" layer. There is
31not yet a clean way to mark the Perl source itself as being in an
32particular encoding.
21bad921 33
34=item Regular Expressions
35
e6739005 36The regular expression compiler does now attempt to produce
37polymorphic opcodes. That is the pattern should now adapt to the data
75daf61c 38and automatically switch to the Unicode character scheme when
39presented with Unicode data, or a traditional byte scheme when
40presented with byte data. The implementation is still new and
41(particularly on EBCDIC platforms) may need further work.
21bad921 42
ad0029c4 43=item C<use utf8> still needed to enable UTF-8/UTF-EBCDIC in scripts
21bad921 44
75daf61c 45The C<utf8> pragma implements the tables used for Unicode support.
46These tables are automatically loaded on demand, so the C<utf8> pragma
47need not normally be used.
21bad921 48
75daf61c 49However, as a compatibility measure, this pragma must be explicitly
ad0029c4 50used to enable recognition of UTF-8 in the Perl scripts themselves on
51ASCII based machines or recognize UTF-EBCDIC on EBCDIC based machines.
7dedd01f 52B<NOTE: this should be the only place where an explicit C<use utf8> is
53needed>.
21bad921 54
55=back
56
57=head2 Byte and Character semantics
393fec97 58
59Beginning with version 5.6, Perl uses logically wide characters to
60represent strings internally. This internal representation of strings
b3419ed8 61uses either the UTF-8 or the UTF-EBCDIC encoding.
393fec97 62
75daf61c 63In future, Perl-level operations can be expected to work with
64characters rather than bytes, in general.
393fec97 65
75daf61c 66However, as strictly an interim compatibility measure, Perl aims to
67provide a safe migration path from byte semantics to character
68semantics for programs. For operations where Perl can unambiguously
69decide that the input data is characters, Perl now switches to
70character semantics. For operations where this determination cannot
71be made without additional information from the user, Perl decides in
72favor of compatibility, and chooses to use byte semantics.
8cbd9a7a 73
74This behavior preserves compatibility with earlier versions of Perl,
75which allowed byte semantics in Perl operations, but only as long as
76none of the program's inputs are marked as being as source of Unicode
77character data. Such data may come from filehandles, from calls to
78external programs, from information provided by the system (such as %ENV),
21bad921 79or from literals and constants in the source text.
8cbd9a7a 80
75daf61c 81If the C<-C> command line switch is used, (or the
82${^WIDE_SYSTEM_CALLS} global flag is set to C<1>), all system calls
83will use the corresponding wide character APIs. Note that this is
84currently only implemented on Windows since other platforms API
85standard on this area.
8cbd9a7a 86
75daf61c 87Regardless of the above, the C<bytes> pragma can always be used to
88force byte semantics in a particular lexical scope. See L<bytes>.
8cbd9a7a 89
90The C<utf8> pragma is primarily a compatibility device that enables
75daf61c 91recognition of UTF-(8|EBCDIC) in literals encountered by the parser.
7dedd01f 92Note that this pragma is only required until a future version of Perl
93in which character semantics will become the default. This pragma may
94then become a no-op. See L<utf8>.
8cbd9a7a 95
96Unless mentioned otherwise, Perl operators will use character semantics
97when they are dealing with Unicode data, and byte semantics otherwise.
98Thus, character semantics for these operations apply transparently; if
99the input data came from a Unicode source (for example, by adding a
100character encoding discipline to the filehandle whence it came, or a
101literal UTF-8 string constant in the program), character semantics
102apply; otherwise, byte semantics are in effect. To force byte semantics
8058d7ab 103on Unicode data, the C<bytes> pragma should be used.
393fec97 104
0a378802 105Notice that if you concatenate strings with byte semantics and strings
106with Unicode character data, the bytes will by default be upgraded
107I<as if they were ISO 8859-1 (Latin-1)> (or if in EBCDIC, after a
108translation to ISO 8859-1). To change this, use the C<encoding>
109pragma, see L<encoding>.
7dedd01f 110
393fec97 111Under character semantics, many operations that formerly operated on
75daf61c 112bytes change to operating on characters. For ASCII data this makes no
113difference, because UTF-8 stores ASCII in single bytes, but for any
114character greater than C<chr(127)>, the character B<may> be stored in
393fec97 115a sequence of two or more bytes, all of which have the high bit set.
2796c109 116
117For C1 controls or Latin 1 characters on an EBCDIC platform the
118character may be stored in a UTF-EBCDIC multi byte sequence. But by
119and large, the user need not worry about this, because Perl hides it
120from the user. A character in Perl is logically just a number ranging
121from 0 to 2**32 or so. Larger characters encode to longer sequences
122of bytes internally, but again, this is just an internal detail which
123is hidden at the Perl level.
393fec97 124
8cbd9a7a 125=head2 Effects of character semantics
393fec97 126
127Character semantics have the following effects:
128
129=over 4
130
131=item *
132
133Strings and patterns may contain characters that have an ordinal value
21bad921 134larger than 255.
393fec97 135
75daf61c 136Presuming you use a Unicode editor to edit your program, such
137characters will typically occur directly within the literal strings as
138UTF-8 (or UTF-EBCDIC on EBCDIC platforms) characters, but you can also
139specify a particular character with an extension of the C<\x>
140notation. UTF-X characters are specified by putting the hexadecimal
141code within curlies after the C<\x>. For instance, a Unicode smiley
142face is C<\x{263A}>.
393fec97 143
144=item *
145
146Identifiers within the Perl script may contain Unicode alphanumeric
147characters, including ideographs. (You are currently on your own when
75daf61c 148it comes to using the canonical forms of characters--Perl doesn't
149(yet) attempt to canonicalize variable names for you.)
393fec97 150
393fec97 151=item *
152
153Regular expressions match characters instead of bytes. For instance,
154"." matches a character instead of a byte. (However, the C<\C> pattern
75daf61c 155is provided to force a match a single byte ("C<char>" in C, hence C<\C>).)
393fec97 156
393fec97 157=item *
158
159Character classes in regular expressions match characters instead of
160bytes, and match against the character properties specified in the
75daf61c 161Unicode properties database. So C<\w> can be used to match an
162ideograph, for instance.
393fec97 163
393fec97 164=item *
165
166Named Unicode properties and block ranges make be used as character
167classes via the new C<\p{}> (matches property) and C<\P{}> (doesn't
168match property) constructs. For instance, C<\p{Lu}> matches any
169character with the Unicode uppercase property, while C<\p{M}> matches
9fdf68be 170any mark character. Single letter properties may omit the brackets,
171so that can be written C<\pM> also. Many predefined character classes
a1cc1cb1 172are available, such as C<\p{IsMirrored}> and C<\p{InTibetan}>.
4193bef7 173
174The C<\p{Is...}> test for "general properties" such as "letter",
175"digit", while the C<\p{In...}> test for Unicode scripts and blocks.
176
e150c829 177The official Unicode script and block names have spaces and dashes and
178separators, but for convenience you can have dashes, spaces, and
179underbars at every word division, and you need not care about correct
180casing. It is recommended, however, that for consistency you use the
181following naming: the official Unicode script, block, or property name
182(see below for the additional rules that apply to block names),
183with whitespace and dashes replaced with underbar, and the words
184"uppercase-first-lowercase-rest". That is, "Latin-1 Supplement"
185becomes "Latin_1_Supplement".
4193bef7 186
a1cc1cb1 187You can also negate both C<\p{}> and C<\P{}> by introducing a caret
e150c829 188(^) between the first curly and the property name: C<\p{^In_Tamil}> is
189equal to C<\P{In_Tamil}>.
4193bef7 190
61247495 191The C<In> and C<Is> can be left out: C<\p{Greek}> is equal to
e150c829 192C<\p{In_Greek}>, C<\P{Pd}> is equal to C<\P{Pd}>.
393fec97 193
d73e5302 194 Short Long
195
196 L Letter
e150c829 197 Lu Uppercase_Letter
198 Ll Lowercase_Letter
199 Lt Titlecase_Letter
200 Lm Modifier_Letter
201 Lo Other_Letter
d73e5302 202
203 M Mark
e150c829 204 Mn Nonspacing_Mark
205 Mc Spacing_Mark
206 Me Enclosing_Mark
d73e5302 207
208 N Number
e150c829 209 Nd Decimal_Number
210 Nl Letter_Number
211 No Other_Number
d73e5302 212
213 P Punctuation
e150c829 214 Pc Connector_Punctuation
215 Pd Dash_Punctuation
216 Ps Open_Punctuation
217 Pe Close_Punctuation
218 Pi Initial_Punctuation
d73e5302 219 (may behave like Ps or Pe depending on usage)
e150c829 220 Pf Final_Punctuation
d73e5302 221 (may behave like Ps or Pe depending on usage)
e150c829 222 Po Other_Punctuation
d73e5302 223
224 S Symbol
e150c829 225 Sm Math_Symbol
226 Sc Currency_Symbol
227 Sk Modifier_Symbol
228 So Other_Symbol
d73e5302 229
230 Z Separator
e150c829 231 Zs Space_Separator
232 Zl Line_Separator
233 Zp Paragraph_Separator
d73e5302 234
235 C Other
e150c829 236 Cc Control
237 Cf Format
238 Cs Surrogate
239 Co Private_Use
240 Cn Unassigned
1ac13f9a 241
242There's also C<L&> which is an alias for C<Ll>, C<Lu>, and C<Lt>.
32293815 243
d73e5302 244The following reserved ranges have C<In> tests:
245
e150c829 246 CJK_Ideograph_Extension_A
247 CJK_Ideograph
248 Hangul_Syllable
249 Non_Private_Use_High_Surrogate
250 Private_Use_High_Surrogate
251 Low_Surrogate
252 Private_Surrogate
253 CJK_Ideograph_Extension_B
254 Plane_15_Private_Use
255 Plane_16_Private_Use
d73e5302 256
257For example C<"\x{AC00}" =~ \p{HangulSyllable}> will test true.
e9ad1727 258(Handling of surrogates is not implemented yet, because Perl
259uses UTF-8 and not UTF-16 internally to represent Unicode.)
d73e5302 260
32293815 261Additionally, because scripts differ in their directionality
262(for example Hebrew is written right to left), all characters
263have their directionality defined:
264
d73e5302 265 BidiL Left-to-Right
266 BidiLRE Left-to-Right Embedding
267 BidiLRO Left-to-Right Override
268 BidiR Right-to-Left
269 BidiAL Right-to-Left Arabic
270 BidiRLE Right-to-Left Embedding
271 BidiRLO Right-to-Left Override
272 BidiPDF Pop Directional Format
273 BidiEN European Number
274 BidiES European Number Separator
275 BidiET European Number Terminator
276 BidiAN Arabic Number
277 BidiCS Common Number Separator
278 BidiNSM Non-Spacing Mark
279 BidiBN Boundary Neutral
280 BidiB Paragraph Separator
281 BidiS Segment Separator
282 BidiWS Whitespace
283 BidiON Other Neutrals
32293815 284
2796c109 285=head2 Scripts
286
75daf61c 287The scripts available for C<\p{In...}> and C<\P{In...}>, for example
288\p{InCyrillic>, are as follows, for example C<\p{InLatin}> or C<\P{InHan}>:
2796c109 289
1ac13f9a 290 Arabic
e9ad1727 291 Armenian
1ac13f9a 292 Bengali
e9ad1727 293 Bopomofo
294 Canadian-Aboriginal
295 Cherokee
296 Cyrillic
297 Deseret
298 Devanagari
299 Ethiopic
300 Georgian
301 Gothic
302 Greek
1ac13f9a 303 Gujarati
e9ad1727 304 Gurmukhi
305 Han
306 Hangul
307 Hebrew
308 Hiragana
309 Inherited
1ac13f9a 310 Kannada
e9ad1727 311 Katakana
312 Khmer
1ac13f9a 313 Lao
e9ad1727 314 Latin
315 Malayalam
316 Mongolian
1ac13f9a 317 Myanmar
1ac13f9a 318 Ogham
e9ad1727 319 Old-Italic
320 Oriya
1ac13f9a 321 Runic
e9ad1727 322 Sinhala
323 Syriac
324 Tamil
325 Telugu
326 Thaana
327 Thai
328 Tibetan
1ac13f9a 329 Yi
1ac13f9a 330
331There are also extended property classes that supplement the basic
332properties, defined by the F<PropList> Unicode database:
333
e9ad1727 334 ASCII_Hex_Digit
1ac13f9a 335 Bidi_Control
1ac13f9a 336 Dash
1ac13f9a 337 Diacritic
338 Extender
e9ad1727 339 Hex_Digit
340 Hyphen
341 Ideographic
342 Join_Control
343 Noncharacter_Code_Point
344 Other_Alphabetic
1ac13f9a 345 Other_Lowercase
e9ad1727 346 Other_Math
1ac13f9a 347 Other_Uppercase
e9ad1727 348 Quotation_Mark
e150c829 349 White_Space
1ac13f9a 350
351and further derived properties:
352
353 Alphabetic Lu + Ll + Lt + Lm + Lo + Other_Alphabetic
354 Lowercase Ll + Other_Lowercase
355 Uppercase Lu + Other_Uppercase
356 Math Sm + Other_Math
357
358 ID_Start Lu + Ll + Lt + Lm + Lo + Nl
359 ID_Continue ID_Start + Mn + Mc + Nd + Pc
360
361 Any Any character
362 Assigned Any non-Cn character
363 Common Any character (or unassigned code point)
e150c829 364 not explicitly assigned to a script
2796c109 365
366=head2 Blocks
367
368In addition to B<scripts>, Unicode also defines B<blocks> of
369characters. The difference between scripts and blocks is that the
e9ad1727 370scripts concept is closer to natural languages, while the blocks
2796c109 371concept is more an artificial grouping based on groups of 256 Unicode
372characters. For example, the C<Latin> script contains letters from
e9ad1727 373many blocks. On the other hand, the C<Latin> script does not contain
374all the characters from those blocks, it does not for example contain
375digits because digits are shared across many scripts. Digits and
376other similar groups, like punctuation, are in a category called
377C<Common>.
2796c109 378
379For more about scripts see the UTR #24:
380http://www.unicode.org/unicode/reports/tr24/
381For more about blocks see
382http://www.unicode.org/Public/UNIDATA/Blocks.txt
383
384Because there are overlaps in naming (there are, for example, both
385a script called C<Katakana> and a block called C<Katakana>, the block
386version has C<Block> appended to its name, C<\p{InKatakanaBlock}>.
387
388Notice that this definition was introduced in Perl 5.8.0: in Perl
e150c829 3895.6 only the blocks were used; in Perl 5.8.0 scripts became the
61247495 390preferential Unicode character class definition; this meant that
391the definitions of some character classes changed (the ones in the
2796c109 392below list that have the C<Block> appended).
393
e9ad1727 394 Alphabetic Presentation Forms
395 Arabic Block
396 Arabic Presentation Forms-A
397 Arabic Presentation Forms-B
398 Armenian Block
399 Arrows
71d929cb 400 Basic Latin
e9ad1727 401 Bengali Block
402 Block Elements
403 Bopomofo Block
404 Bopomofo Extended
405 Box Drawing
406 Braille Patterns
407 Byzantine Musical Symbols
408 CJK Compatibility
409 CJK Compatibility Forms
410 CJK Compatibility Ideographs
411 CJK Compatibility Ideographs Supplement
412 CJK Radicals Supplement
413 CJK Symbols and Punctuation
414 CJK Unified Ideographs
415 CJK Unified Ideographs Extension A
416 CJK Unified Ideographs Extension B
417 Cherokee Block
71d929cb 418 Combining Diacritical Marks
e9ad1727 419 Combining Half Marks
420 Combining Marks for Symbols
421 Control Pictures
422 Currency Symbols
71d929cb 423 Cyrillic Block
e9ad1727 424 Deseret Block
71d929cb 425 Devanagari Block
e9ad1727 426 Dingbats
427 Enclosed Alphanumerics
428 Enclosed CJK Letters and Months
429 Ethiopic Block
430 General Punctuation
431 Geometric Shapes
71d929cb 432 Georgian Block
e9ad1727 433 Gothic Block
434 Greek Block
435 Greek Extended
436 Gujarati Block
437 Gurmukhi Block
438 Halfwidth and Fullwidth Forms
439 Hangul Compatibility Jamo
71d929cb 440 Hangul Jamo
e9ad1727 441 Hangul Syllables
442 Hebrew Block
443 High Private Use Surrogates
444 High Surrogates
445 Hiragana Block
446 IPA Extensions
447 Ideographic Description Characters
448 Kanbun
449 Kangxi Radicals
450 Kannada Block
451 Katakana Block
71d929cb 452 Khmer Block
e9ad1727 453 Lao Block
454 Latin 1 Supplement
71d929cb 455 Latin Extended Additional
e9ad1727 456 Latin Extended-A
457 Latin Extended-B
71d929cb 458 Letterlike Symbols
e9ad1727 459 Low Surrogates
460 Malayalam Block
461 Mathematical Alphanumeric Symbols
71d929cb 462 Mathematical Operators
e9ad1727 463 Miscellaneous Symbols
71d929cb 464 Miscellaneous Technical
e9ad1727 465 Mongolian Block
466 Musical Symbols
467 Myanmar Block
468 Number Forms
469 Ogham Block
470 Old Italic Block
71d929cb 471 Optical Character Recognition
e9ad1727 472 Oriya Block
71d929cb 473 Private Use
e9ad1727 474 Runic Block
475 Sinhala Block
71d929cb 476 Small Form Variants
e9ad1727 477 Spacing Modifier Letters
2796c109 478 Specials
e9ad1727 479 Superscripts and Subscripts
480 Syriac Block
2796c109 481 Tags
e9ad1727 482 Tamil Block
483 Telugu Block
484 Thaana Block
485 Thai Block
486 Tibetan Block
487 Unified Canadian Aboriginal Syllabics
488 Yi Radicals
489 Yi Syllables
32293815 490
393fec97 491=item *
492
493The special pattern C<\X> match matches any extended Unicode sequence
494(a "combining character sequence" in Standardese), where the first
495character is a base character and subsequent characters are mark
496characters that apply to the base character. It is equivalent to
497C<(?:\PM\pM*)>.
498
393fec97 499=item *
500
383e7cdd 501The C<tr///> operator translates characters instead of bytes. Note
502that the C<tr///CU> functionality has been removed, as the interface
503was a mistake. For similar functionality see pack('U0', ...) and
504pack('C0', ...).
393fec97 505
393fec97 506=item *
507
508Case translation operators use the Unicode case translation tables
44bc797b 509when provided character input. Note that C<uc()> (also known as C<\U>
510in doublequoted strings) translates to uppercase, while C<ucfirst>
511(also known as C<\u> in doublequoted strings) translates to titlecase
512(for languages that make the distinction). Naturally the
513corresponding backslash sequences have the same semantics.
393fec97 514
515=item *
516
517Most operators that deal with positions or lengths in the string will
75daf61c 518automatically switch to using character positions, including
519C<chop()>, C<substr()>, C<pos()>, C<index()>, C<rindex()>,
520C<sprintf()>, C<write()>, and C<length()>. Operators that
521specifically don't switch include C<vec()>, C<pack()>, and
522C<unpack()>. Operators that really don't care include C<chomp()>, as
523well as any other operator that treats a string as a bucket of bits,
524such as C<sort()>, and the operators dealing with filenames.
393fec97 525
526=item *
527
528The C<pack()>/C<unpack()> letters "C<c>" and "C<C>" do I<not> change,
529since they're often used for byte-oriented formats. (Again, think
530"C<char>" in the C language.) However, there is a new "C<U>" specifier
531that will convert between UTF-8 characters and integers. (It works
532outside of the utf8 pragma too.)
533
534=item *
535
536The C<chr()> and C<ord()> functions work on characters. This is like
537C<pack("U")> and C<unpack("U")>, not like C<pack("C")> and
538C<unpack("C")>. In fact, the latter are how you now emulate
35bcd338 539byte-oriented C<chr()> and C<ord()> for Unicode strings.
540(Note that this reveals the internal UTF-8 encoding of strings and
541you are not supposed to do that unless you know what you are doing.)
393fec97 542
543=item *
544
a1ca4561 545The bit string operators C<& | ^ ~> can operate on character data.
546However, for backward compatibility reasons (bit string operations
75daf61c 547when the characters all are less than 256 in ordinal value) one should
548not mix C<~> (the bit complement) and characters both less than 256 and
a1ca4561 549equal or greater than 256. Most importantly, the DeMorgan's laws
550(C<~($x|$y) eq ~$x&~$y>, C<~($x&$y) eq ~$x|~$y>) won't hold.
551Another way to look at this is that the complement cannot return
75daf61c 552B<both> the 8-bit (byte) wide bit complement B<and> the full character
a1ca4561 553wide bit complement.
554
555=item *
556
983ffd37 557lc(), uc(), lcfirst(), and ucfirst() work for the following cases:
558
559=over 8
560
561=item *
562
563the case mapping is from a single Unicode character to another
564single Unicode character
565
566=item *
567
568the case mapping is from a single Unicode character to more
569than one Unicode character
570
571=back
572
573What doesn't yet work are the followng cases:
574
575=over 8
576
577=item *
578
579the "final sigma" (Greek)
580
581=item *
582
583anything to with locales (Lithuanian, Turkish, Azeri)
584
585=back
586
587See the Unicode Technical Report #21, Case Mappings, for more details.
ac1256e8 588
589=item *
590
393fec97 591And finally, C<scalar reverse()> reverses by character rather than by byte.
592
593=back
594
8cbd9a7a 595=head2 Character encodings for input and output
596
7221edc9 597See L<Encode>.
8cbd9a7a 598
393fec97 599=head1 CAVEATS
600
601As of yet, there is no method for automatically coercing input and
b3419ed8 602output to some encoding other than UTF-8 or UTF-EBCDIC. This is planned
603in the near future, however.
393fec97 604
8cbd9a7a 605Whether an arbitrary piece of data will be treated as "characters" or
606"bytes" by internal operations cannot be divined at the current time.
393fec97 607
608Use of locales with utf8 may lead to odd results. Currently there is
609some attempt to apply 8-bit locale info to characters in the range
6100..255, but this is demonstrably incorrect for locales that use
611characters above that range (when mapped into Unicode). It will also
612tend to run slower. Avoidance of locales is strongly encouraged.
613
776f8809 614=head1 UNICODE REGULAR EXPRESSION SUPPORT LEVEL
615
616The following list of Unicode regular expression support describes
617feature by feature the Unicode support implemented in Perl as of Perl
6185.8.0. The "Level N" and the section numbers refer to the Unicode
619Technical Report 18, "Unicode Regular Expression Guidelines".
620
621=over 4
622
623=item *
624
625Level 1 - Basic Unicode Support
626
627 2.1 Hex Notation - done [1]
628 Named Notation - done [2]
629 2.2 Categories - done [3][4]
630 2.3 Subtraction - MISSING [5][6]
631 2.4 Simple Word Boundaries - done [7]
632 2.5 Simple Loose Matches - MISSING [8]
633 2.6 End of Line - MISSING [9][10]
634
635 [ 1] \x{...}
636 [ 2] \N{...}
637 [ 3] . \p{Is...} \P{Is...}
638 [ 4] now scripts (see UTR#24 Script Names) in addition to blocks
639 [ 5] have negation
640 [ 6] can use look-ahead to emulate subtracion
641 [ 7] include Letters in word characters
642 [ 8] see UTR#21 Case Mappings
643 [ 9] see UTR#13 Unicode Newline Guidelines
644 [10] should do ^ and $ also on \x{2028} and \x{2029}
645
646=item *
647
648Level 2 - Extended Unicode Support
649
650 3.1 Surrogates - MISSING
651 3.2 Canonical Equivalents - MISSING [11][12]
652 3.3 Locale-Independent Graphemes - MISSING [13]
653 3.4 Locale-Independent Words - MISSING [14]
654 3.5 Locale-Independent Loose Matches - MISSING [15]
655
656 [11] see UTR#15 Unicode Normalization
657 [12] have Unicode::Normalize but not integrated to regexes
658 [13] have \X but at this level . should equal that
659 [14] need three classes, not just \w and \W
660 [15] see UTR#21 Case Mappings
661
662=item *
663
664Level 3 - Locale-Sensitive Support
665
666 4.1 Locale-Dependent Categories - MISSING
667 4.2 Locale-Dependent Graphemes - MISSING [16][17]
668 4.3 Locale-Dependent Words - MISSING
669 4.4 Locale-Dependent Loose Matches - MISSING
670 4.5 Locale-Dependent Ranges - MISSING
671
672 [16] see UTR#10 Unicode Collation Algorithms
673 [17] have Unicode::Collate but not integrated to regexes
674
675=back
676
393fec97 677=head1 SEE ALSO
678
32293815 679L<bytes>, L<utf8>, L<perlretut>, L<perlvar/"${^WIDE_SYSTEM_CALLS}">
393fec97 680
681=cut