This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Merge branch for improving API UTF-8 handling into blead
[perl5.git] / unicode_constants.h
CommitLineData
61dad979
KW
1/* -*- buffer-read-only: t -*-
2 * !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
1b0f46bf 3 * This file is built by regen/unicode_constants.pl from Unicode data.
61dad979
KW
4 * Any changes made here will be lost!
5 */
6
d10c72f2 7
1b0f46bf
KW
8#ifndef H_UNICODE_CONSTANTS /* Guard against nested #includes */
9#define H_UNICODE_CONSTANTS 1
d10c72f2 10
4b4853d1
KW
11/* This file contains #defines for the version of Unicode being used and
12 * various Unicode code points. The values the code point macros expand to
13 * are the native Unicode code point, or all or portions of the UTF-8 encoding
14 * for the code point. In the former case, the macro name has the suffix
15 * "_NATIVE"; otherwise, the suffix "_UTF8".
61dad979 16 *
525b6419
KW
17 * The macros that have the suffix "_UTF8" may have further suffixes, as
18 * follows:
19 * "_FIRST_BYTE" if the value is just the first byte of the UTF-8
20 * representation; the value will be a numeric constant.
21 * "_TAIL" if instead it represents all but the first byte. This, and
22 * with no additional suffix are both string constants */
61dad979 23
f2bfbac0 24#define UNICODE_MAJOR_VERSION 9
4b4853d1
KW
25#define UNICODE_DOT_VERSION 0
26#define UNICODE_DOT_DOT_VERSION 0
27
76837d21 28
ad88cddb
KW
29#if 'A' == 65 /* ASCII/Latin1 */
30# define LATIN_SMALL_LETTER_LONG_S_UTF8 "\xC5\xBF" /* U+017F */
76837d21 31
ad88cddb 32# define COMBINING_GRAVE_ACCENT_UTF8 "\xCC\x80" /* U+0300 */
a78bc3c6 33
ad88cddb
KW
34# define GREEK_CAPITAL_LETTER_IOTA_UTF8 "\xCE\x99" /* U+0399 */
35# define GREEK_SMALL_LETTER_MU_UTF8 "\xCE\xBC" /* U+03BC */
f2e06375 36
ad88cddb 37# define LATIN_CAPITAL_LETTER_SHARP_S_UTF8 "\xE1\xBA\x9E" /* U+1E9E */
a9f50d33 38
ad88cddb
KW
39# define LATIN_SMALL_LIGATURE_LONG_S_T_UTF8 "\xEF\xAC\x85" /* U+FB05 */
40# define LATIN_SMALL_LIGATURE_ST_UTF8 "\xEF\xAC\x86" /* U+FB06 */
a0ffb25e
KW
41# define LATIN_CAPITAL_LETTER_I_WITH_DOT_ABOVE_UTF8 "\xC4\xB0" /* U+0130 */
42# define LATIN_SMALL_LETTER_DOTLESS_I_UTF8 "\xC4\xB1" /* U+0131 */
1dfa4f52 43
ad88cddb 44# define HYPHEN_UTF8 "\xE2\x80\x90" /* U+2010 */
ad88cddb
KW
45# define BOM_UTF8_FIRST_BYTE 0xEF /* U+FEFF */
46# define BOM_UTF8_TAIL "\xBB\xBF" /* U+FEFF */
df758df2 47
ad88cddb
KW
48# define NBSP_NATIVE 0xA0 /* U+00A0 */
49# define NBSP_UTF8 "\xC2\xA0" /* U+00A0 */
50
51# define DEL_NATIVE 0x7F /* U+007F */
52# define CR_NATIVE 0x0D /* U+000D */
53# define LF_NATIVE 0x0A /* U+000A */
d804860b
KW
54# define VT_NATIVE 0x0B /* U+000B */
55# define ESC_NATIVE 0x1B /* U+001B */
ad88cddb
KW
56# define LATIN_SMALL_LETTER_SHARP_S_NATIVE 0xDF /* U+00DF */
57# define LATIN_SMALL_LETTER_A_WITH_RING_ABOVE_NATIVE 0xE5 /* U+00E5 */
58# define LATIN_CAPITAL_LETTER_A_WITH_RING_ABOVE_NATIVE 0xC5 /* U+00C5 */
59# define LATIN_SMALL_LETTER_Y_WITH_DIAERESIS_NATIVE 0xFF /* U+00FF */
60# define MICRO_SIGN_NATIVE 0xB5 /* U+00B5 */
09cc440d 61# define MAX_PRINT_A_FOR_USE_ONLY_BY_REGCOMP_DOT_C 0x7E /* The max code point that isPRINT_A */
ad88cddb
KW
62
63#endif /* ASCII/Latin1 */
64
65#if 'A' == 193 /* EBCDIC 1047 */ \
66 && '\\' == 224 && '[' == 173 && ']' == 189 && '{' == 192 && '}' == 208 \
67 && '^' == 95 && '~' == 161 && '!' == 90 && '#' == 123 && '|' == 79 \
68 && '$' == 91 && '@' == 124 && '`' == 121
69# define LATIN_SMALL_LETTER_LONG_S_UTF8 "\x8F\x73" /* U+017F */
70
71# define COMBINING_GRAVE_ACCENT_UTF8 "\xAF\x41" /* U+0300 */
72
73# define GREEK_CAPITAL_LETTER_IOTA_UTF8 "\xB3\x68" /* U+0399 */
74# define GREEK_SMALL_LETTER_MU_UTF8 "\xB4\x70" /* U+03BC */
75
76# define LATIN_CAPITAL_LETTER_SHARP_S_UTF8 "\xBF\x63\x72" /* U+1E9E */
77
78# define LATIN_SMALL_LIGATURE_LONG_S_T_UTF8 "\xDD\x72\x67\x46" /* U+FB05 */
79# define LATIN_SMALL_LIGATURE_ST_UTF8 "\xDD\x72\x67\x47" /* U+FB06 */
a0ffb25e
KW
80# define LATIN_CAPITAL_LETTER_I_WITH_DOT_ABOVE_UTF8 "\x8D\x57" /* U+0130 */
81# define LATIN_SMALL_LETTER_DOTLESS_I_UTF8 "\x8D\x58" /* U+0131 */
ad88cddb
KW
82
83# define HYPHEN_UTF8 "\xCA\x41\x57" /* U+2010 */
ad88cddb
KW
84# define BOM_UTF8_FIRST_BYTE 0xDD /* U+FEFF */
85# define BOM_UTF8_TAIL "\x73\x66\x73" /* U+FEFF */
86
87# define NBSP_NATIVE 0x41 /* U+00A0 */
88# define NBSP_UTF8 "\x80\x41" /* U+00A0 */
89
90# define DEL_NATIVE 0x07 /* U+007F */
91# define CR_NATIVE 0x0D /* U+000D */
92# define LF_NATIVE 0x15 /* U+000A */
d804860b
KW
93# define VT_NATIVE 0x0B /* U+000B */
94# define ESC_NATIVE 0x27 /* U+001B */
ad88cddb
KW
95# define LATIN_SMALL_LETTER_SHARP_S_NATIVE 0x59 /* U+00DF */
96# define LATIN_SMALL_LETTER_A_WITH_RING_ABOVE_NATIVE 0x47 /* U+00E5 */
97# define LATIN_CAPITAL_LETTER_A_WITH_RING_ABOVE_NATIVE 0x67 /* U+00C5 */
98# define LATIN_SMALL_LETTER_Y_WITH_DIAERESIS_NATIVE 0xDF /* U+00FF */
99# define MICRO_SIGN_NATIVE 0xA0 /* U+00B5 */
09cc440d 100# define MAX_PRINT_A_FOR_USE_ONLY_BY_REGCOMP_DOT_C 0xF9 /* The max code point that isPRINT_A */
ad88cddb
KW
101
102#endif /* EBCDIC 1047 */
103
104#if 'A' == 193 /* EBCDIC 037 */ \
105 && '\\' == 224 && '[' == 186 && ']' == 187 && '{' == 192 && '}' == 208 \
106 && '^' == 176 && '~' == 161 && '!' == 90 && '#' == 123 && '|' == 79 \
107 && '$' == 91 && '@' == 124 && '`' == 121
108# define LATIN_SMALL_LETTER_LONG_S_UTF8 "\x8E\x72" /* U+017F */
109
110# define COMBINING_GRAVE_ACCENT_UTF8 "\xAD\x41" /* U+0300 */
111
112# define GREEK_CAPITAL_LETTER_IOTA_UTF8 "\xB2\x67" /* U+0399 */
113# define GREEK_SMALL_LETTER_MU_UTF8 "\xB3\x6A" /* U+03BC */
114
115# define LATIN_CAPITAL_LETTER_SHARP_S_UTF8 "\xBF\x62\x71" /* U+1E9E */
116
117# define LATIN_SMALL_LIGATURE_LONG_S_T_UTF8 "\xDD\x71\x66\x46" /* U+FB05 */
118# define LATIN_SMALL_LIGATURE_ST_UTF8 "\xDD\x71\x66\x47" /* U+FB06 */
a0ffb25e
KW
119# define LATIN_CAPITAL_LETTER_I_WITH_DOT_ABOVE_UTF8 "\x8C\x57" /* U+0130 */
120# define LATIN_SMALL_LETTER_DOTLESS_I_UTF8 "\x8C\x58" /* U+0131 */
ad88cddb
KW
121
122# define HYPHEN_UTF8 "\xCA\x41\x57" /* U+2010 */
ad88cddb
KW
123# define BOM_UTF8_FIRST_BYTE 0xDD /* U+FEFF */
124# define BOM_UTF8_TAIL "\x72\x65\x72" /* U+FEFF */
125
126# define NBSP_NATIVE 0x41 /* U+00A0 */
127# define NBSP_UTF8 "\x78\x41" /* U+00A0 */
128
129# define DEL_NATIVE 0x07 /* U+007F */
130# define CR_NATIVE 0x0D /* U+000D */
131# define LF_NATIVE 0x25 /* U+000A */
d804860b
KW
132# define VT_NATIVE 0x0B /* U+000B */
133# define ESC_NATIVE 0x27 /* U+001B */
ad88cddb
KW
134# define LATIN_SMALL_LETTER_SHARP_S_NATIVE 0x59 /* U+00DF */
135# define LATIN_SMALL_LETTER_A_WITH_RING_ABOVE_NATIVE 0x47 /* U+00E5 */
136# define LATIN_CAPITAL_LETTER_A_WITH_RING_ABOVE_NATIVE 0x67 /* U+00C5 */
137# define LATIN_SMALL_LETTER_Y_WITH_DIAERESIS_NATIVE 0xDF /* U+00FF */
138# define MICRO_SIGN_NATIVE 0xA0 /* U+00B5 */
09cc440d 139# define MAX_PRINT_A_FOR_USE_ONLY_BY_REGCOMP_DOT_C 0xF9 /* The max code point that isPRINT_A */
ad88cddb
KW
140
141#endif /* EBCDIC 037 */
142
b35552de 143/* The number of code points not matching \pC */
f2bfbac0 144#define NON_OTHER_COUNT_FOR_USE_ONLY_BY_REGCOMP_DOT_C 128021
b35552de 145
3bfc1e70 146/* The highest code point that has any type of case change */
f2bfbac0 147#define HIGHEST_CASE_CHANGING_CP_FOR_USE_ONLY_BY_UTF8_DOT_C 0x1E943
3bfc1e70 148
1b0f46bf 149#endif /* H_UNICODE_CONSTANTS */
d10c72f2 150
61dad979 151/* ex: set ro: */