1#
2#
3#=======================================================================
4#   File name:  DEVANAGA.TXT
5#
6#   Contents:   Map (external version) from Mac OS Devanagari
7#               encoding to Unicode 2.1 and later.
8#
9#   Copyright:  (c) 1995-2002, 2005 by Apple Computer, Inc., all rights
10#               reserved.
11#
12#   Contact:    charsets@apple.com
13#
14#   Changes:
15#
16#       c02  2005-Apr-05    Update header comments; add section on
17#                           roundtrip considerations. Matches internal
18#                           xml <c1.1> and Text Encoding Converter 2.0.
19#      b3,c1 2002-Dec-19    Update URLs. Matches internal utom<b1>.
20#       b02  1999-Sep-22    Update contact e-mail address. Matches
21#                           internal utom<b1>, ufrm<b1>, and Text
22#                           Encoding Converter version 1.5.
23#       n04  1998-Feb-05    First version; matches internal utom<n9>,
24#                           ufrm<n15>.
25#
26# Standard header:
27# ----------------
28#
29#   Apple, the Apple logo, and Macintosh are trademarks of Apple
30#   Computer, Inc., registered in the United States and other countries.
31#   Unicode is a trademark of Unicode Inc. For the sake of brevity,
32#   throughout this document, "Macintosh" can be used to refer to
33#   Macintosh computers and "Unicode" can be used to refer to the
34#   Unicode standard.
35#
36#   Apple Computer, Inc. ("Apple") makes no warranty or representation,
37#   either express or implied, with respect to this document and the
38#   included data, its quality, accuracy, or fitness for a particular
39#   purpose. In no event will Apple be liable for direct, indirect,
40#   special, incidental, or consequential damages resulting from any
41#   defect or inaccuracy in this document or the included data.
42#
43#   These mapping tables and character lists are subject to change.
44#   The latest tables should be available from the following:
45#
46#   <http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/>
47#
48#   For general information about Mac OS encodings and these mapping
49#   tables, see the file "README.TXT".
50#
51# Format:
52# -------
53#
54#   Three tab-separated columns;
55#   '#' begins a comment which continues to the end of the line.
56#     Column #1 is the Mac OS Devanagari code or code sequence
57#       (in hex as 0xNN or 0xNN+0xNN)
58#     Column #2 is the corresponding Unicode or Unicode sequence
59#       (in hex as 0xNNNN or 0xNNNN+0xNNNN).
60#     Column #3 is a comment containing the Unicode name or sequence
61#       of names. In some cases an additional comment follows the
62#       Unicode name(s).
63#
64#   The entries are in two sections. The first section is for pairs of
65#   Mac OS Devanagari code points that must be mapped in a special way.
66#   The second section maps individual code points.
67#
68#   Within each section, the entries are in Mac OS Devanagari code order.
69#
70#   Control character mappings are not shown in this table, following
71#   the conventions of the standard UTC mapping tables. However, the
72#   Mac OS Devanagari character set uses the standard control characters
73#   at 0x00-0x1F and 0x7F.
74#
75# Notes on Mac OS Devanagari:
76# ---------------------------
77#
78#   This is a legacy Mac OS encoding; in the Mac OS X Carbon and Cocoa
79#   environments, it is only supported via transcoding to and from
80#   Unicode.
81#
82#   Mac OS Devanagari is based on IS 13194:1991 (ISCII-91), with the
83#   addition of several punctuation and symbol characters. However,
84#   Mac OS Devanagari does not support the ATR (attribute) mechanism of
85#   ISCII-91.
86#
87# 1. ISCII-91 features in Mac OS Devanagari include:
88#
89#  a) Overloading of nukta
90#
91#     In addition to using the nukta (0xE9) like a combining dot below,
92#     nukta is overloaded to function as a general character modifier.
93#     In this role, certain code points followed by 0xE9 are treated as
94#     a two-byte code point representing a character which may be
95#     rather different than the characters represented by either of
96#     the code points alone. For example, the character DEVANAGARI OM
97#     (U+0950) is represented in ISCII-91 as candrabindu + nukta.
98#
99#  b) Explicit halant and soft halant
100#
101#     A double halant (0xE8 + 0xE8) constitutes an "explicit halant",
102#     which will always appear as a halant instead of causing formation
103#     of a ligature or half-form consonant.
104#
105#     Halant followed by nukta (0xE8 + 0xE9) constitutes a "soft
106#     halant", which prevents formation of a ligature and instead
107#     retains the half-form of the first consonant.
108#
109#  c) Invisible consonant
110#
111#     The byte 0xD9 (called INV in ISCII-91) is an invisible consonant:
112#     It behaves like a consonant but has no visible appearance. It is
113#     intended to be used (often in combination with halant) to display
114#     dependent forms in isolation, such as the RA forms or consonant
115#     half-forms.
116#
117#  d) Extensions for Vedic, etc.
118#
119#     The byte 0xF0 (called EXT in ISCII-91) followed by any byte in
120#     the range 0xA1-0xEE constitutes a two-byte code point which can
121#     be used to represent additional characters for Vedic (or other
122#     extensions); 0xF0 followed by any other byte value constitutes
123#     malformed text. Mac OS Devanagari supports this mechanism, but
124#     does not currently map any of these two-byte code points to
125#     anything.
126#
127# 2. Mac OS Devanagari additions
128#
129#   Mac OS Devanagari adds characters using the code points
130#   0x80-0x8A and 0x90-0x91 (the latter are some Devanagari additions
131#   from Unicode).
132#
133# 3. Unused code points
134#
135#   The following code points are currently unused, and are not shown
136#   here: 0x8B-0x8F, 0x92-0xA0, 0xEB-0xEF, 0xFB-0xFF. In addition,
137#   0xF0 is not shown here, but it has a special function as described
138#   above.
139#
140# Unicode mapping issues and notes:
141# ---------------------------------
142#
143# 1. Mapping the byte pairs
144#
145#   If one of the following byte values is encountered when mapping
146#   Mac OS Devanagari text - 0xA1, 0xA6, 0xA7, 0xAA, 0xDB, 0xDC, 0xDF,
147#   0xE8, or 0xEA - then the next byte (if there is one) should be
148#   examined. If the next byte is 0xE9 - or also 0xE8, if the first
149#   byte was 0xE8 - then the byte pair should be mapped using the
150#   first section of the mapping table below. Otherwise, each byte
151#   should be mapped using the second section of the mapping table
152#   below.
153#
154#   - The Unicode Standard, Version 2.0, specifies how explicit
155#     halant and soft halant should be represented in Unicode;
156#     these mappings are used below.
157#
158#   If the byte value 0xF0 is encountered when mapping Mac OS
159#   Devanagari text, then the next byte should be examined. If there
160#   is no next byte (e.g. 0xF0 at end of buffer), the mapping
161#   process should indicate incomplete character. If there is a next
162#   byte but it is not in the range 0xA1-0xEE, the mapping process
163#   should indicate malformed text. Otherwise, the mapping process
164#   should treat the byte pair as a valid two-byte code point with no
165#   mapping (e.g. map it to QUESTION MARK, REPLACEMENT CHARACTER,
166#   etc.).
167#
168# 2. Mapping the invisible consonant
169#
170#   It has been suggested that INV in ISCII-91 should map to ZERO
171#   WIDTH NON-JOINER in Unicode. However, this causes problems with
172#   roundtrip fidelity: The ISCII-91 sequences 0xE8+0xE8 and 0xE8+0xD9
173#   would map to the same sequence of Unicode characters. We have
174#   instead mapped INV to LEFT-TO-RIGHT MARK, which avoids these
175#   problems.
176#
177# 3. Additional loose mappings from Unicode
178#
179#   These are not preserved in roundtrip mappings.
180#
181#   U+0958  0xB3+0xE9  # DEVANAGARI LETTER QA
182#   U+0959  0xB4+0xE9  # DEVANAGARI LETTER KHHA
183#   U+095A  0xB5+0xE9  # DEVANAGARI LETTER GHHA
184#   U+095B  0xBA+0xE9  # DEVANAGARI LETTER ZA
185#   U+095C  0xBF+0xE9  # DEVANAGARI LETTER DDDHA
186#   U+095D  0xC0+0xE9  # DEVANAGARI LETTER RHA
187#   U+095E  0xC9+0xE9  # DEVANAGARI LETTER FA
188#
189# 4. Roundtrip considerations when mapping to decomposed Unicode
190#
191#   Both ISCII-91 (hence Mac OS Devanagari) and Unicode provide multiple
192#   ways of representing certain Devanagari consonants. For example,
193#   DEVANAGARI LETTER NNNA can be represented in Unicode as the single
194#   character 0x0929 or as the sequence 0x0928 0x093C; similarly, this
195#   consonant can be represented in Mac OS Devanagari as 0xC7 or as the
196#   sequence 0xC6 0xE9. This leads to some roundtrip problems. First
197#   note that we have the following mappings without such problems:
198#
199#   ISCII/  standard                  decomposition of  reverse mapping
200#   Mac OS  Unicode mapping           standard mapping  of decomposition
201#   ------  -----------------------   ----------------  ----------------
202#   0xC6    0x0928  ... LETTER NA     0x0928 (same)     0xC6
203#   0xCD    0x092F  ... LETTER YA     0x092F (same)     0xCD
204#   0xCF    0x0930  ... LETTER RA     0x0930 (same)     0xCF
205#   0xD2    0x0933  ... LETTER LLA    0x0933 (same)     0xD2
206#   0xE9    0x093C  ... SIGN NUKTA    0x093C (same)     0xE9
207#
208#   However, those mappings above cause roundtrip problems for the
209#   the following mappings if they are decomposed:
210#
211#   ISCII/  standard                  decomposition of  reverse mapping
212#   Mac OS  Unicode mapping           standard mapping  of decomposition
213#   ------  -----------------------   ----------------  ----------------
214#   0xC7    0x0929  ... LETTER NNNA   0x0928 0x093C     0xC6 0xE9
215#   0xCE    0x095F  ... LETTER YYA    0x092F 0x093C     0xCD 0xE9
216#   0xD0    0x0931  ... LETTER RRA    0x0930 0x093C     0xCF 0xE9
217#   0xD3    0x0934  ... LETTER LLLA   0x0933 0x093C     0xD2 0xE9
218#
219#   One solution is to use a grouping transcoding hint with the four
220#   decompositions above to mark the decomposed sequence for special
221#   treatment in transcoding. This yields the following mappings to
222#   decomposed Unicode:
223#
224#   ISCII/                     decomposed
225#   Mac OS                     Unicode mapping
226#   ------                     ----------------
227#   0xC7                       0xF860 0x0928 0x093C
228#   0xCE                       0xF860 0x092F 0x093C
229#   0xD0                       0xF860 0x0930 0x093C
230#   0xD3                       0xF860 0x0933 0x093C
231#
232# Details of mapping changes in each version:
233# -------------------------------------------
234#
235##################
236
237# Section 1: Map the following byte pairs as indicated:
238# (ZWNJ means ZERO WIDTH NON-JOINER, ZWJ means ZERO WIDTH JOINER)
239# (Also see note about 0xF0 in comments above)
240
2410xA1+0xE9	0x0950	# DEVANAGARI OM
2420xA6+0xE9	0x090C	# DEVANAGARI LETTER VOCALIC L
2430xA7+0xE9	0x0961	# DEVANAGARI LETTER VOCALIC LL
2440xAA+0xE9	0x0960	# DEVANAGARI LETTER VOCALIC RR
2450xDB+0xE9	0x0962	# DEVANAGARI VOWEL SIGN VOCALIC L
2460xDC+0xE9	0x0963	# DEVANAGARI VOWEL SIGN VOCALIC LL
2470xDF+0xE9	0x0944	# DEVANAGARI VOWEL SIGN VOCALIC RR
2480xE8+0xE8	0x094D+0x200C	# DEVANAGARI SIGN VIRAMA + ZWNJ # explicit halant
2490xE8+0xE9	0x094D+0x200D	# DEVANAGARI SIGN VIRAMA + ZWJ # soft halant
2500xEA+0xE9	0x093D	# DEVANAGARI SIGN AVAGRAHA
251
252# Section 2: Map the remaining bytes as follows:
253
2540x20	0x0020	# SPACE
2550x21	0x0021	# EXCLAMATION MARK
2560x22	0x0022	# QUOTATION MARK
2570x23	0x0023	# NUMBER SIGN
2580x24	0x0024	# DOLLAR SIGN
2590x25	0x0025	# PERCENT SIGN
2600x26	0x0026	# AMPERSAND
2610x27	0x0027	# APOSTROPHE
2620x28	0x0028	# LEFT PARENTHESIS
2630x29	0x0029	# RIGHT PARENTHESIS
2640x2A	0x002A	# ASTERISK
2650x2B	0x002B	# PLUS SIGN
2660x2C	0x002C	# COMMA
2670x2D	0x002D	# HYPHEN-MINUS
2680x2E	0x002E	# FULL STOP
2690x2F	0x002F	# SOLIDUS
2700x30	0x0030	# DIGIT ZERO
2710x31	0x0031	# DIGIT ONE
2720x32	0x0032	# DIGIT TWO
2730x33	0x0033	# DIGIT THREE
2740x34	0x0034	# DIGIT FOUR
2750x35	0x0035	# DIGIT FIVE
2760x36	0x0036	# DIGIT SIX
2770x37	0x0037	# DIGIT SEVEN
2780x38	0x0038	# DIGIT EIGHT
2790x39	0x0039	# DIGIT NINE
2800x3A	0x003A	# COLON
2810x3B	0x003B	# SEMICOLON
2820x3C	0x003C	# LESS-THAN SIGN
2830x3D	0x003D	# EQUALS SIGN
2840x3E	0x003E	# GREATER-THAN SIGN
2850x3F	0x003F	# QUESTION MARK
2860x40	0x0040	# COMMERCIAL AT
2870x41	0x0041	# LATIN CAPITAL LETTER A
2880x42	0x0042	# LATIN CAPITAL LETTER B
2890x43	0x0043	# LATIN CAPITAL LETTER C
2900x44	0x0044	# LATIN CAPITAL LETTER D
2910x45	0x0045	# LATIN CAPITAL LETTER E
2920x46	0x0046	# LATIN CAPITAL LETTER F
2930x47	0x0047	# LATIN CAPITAL LETTER G
2940x48	0x0048	# LATIN CAPITAL LETTER H
2950x49	0x0049	# LATIN CAPITAL LETTER I
2960x4A	0x004A	# LATIN CAPITAL LETTER J
2970x4B	0x004B	# LATIN CAPITAL LETTER K
2980x4C	0x004C	# LATIN CAPITAL LETTER L
2990x4D	0x004D	# LATIN CAPITAL LETTER M
3000x4E	0x004E	# LATIN CAPITAL LETTER N
3010x4F	0x004F	# LATIN CAPITAL LETTER O
3020x50	0x0050	# LATIN CAPITAL LETTER P
3030x51	0x0051	# LATIN CAPITAL LETTER Q
3040x52	0x0052	# LATIN CAPITAL LETTER R
3050x53	0x0053	# LATIN CAPITAL LETTER S
3060x54	0x0054	# LATIN CAPITAL LETTER T
3070x55	0x0055	# LATIN CAPITAL LETTER U
3080x56	0x0056	# LATIN CAPITAL LETTER V
3090x57	0x0057	# LATIN CAPITAL LETTER W
3100x58	0x0058	# LATIN CAPITAL LETTER X
3110x59	0x0059	# LATIN CAPITAL LETTER Y
3120x5A	0x005A	# LATIN CAPITAL LETTER Z
3130x5B	0x005B	# LEFT SQUARE BRACKET
3140x5C	0x005C	# REVERSE SOLIDUS
3150x5D	0x005D	# RIGHT SQUARE BRACKET
3160x5E	0x005E	# CIRCUMFLEX ACCENT
3170x5F	0x005F	# LOW LINE
3180x60	0x0060	# GRAVE ACCENT
3190x61	0x0061	# LATIN SMALL LETTER A
3200x62	0x0062	# LATIN SMALL LETTER B
3210x63	0x0063	# LATIN SMALL LETTER C
3220x64	0x0064	# LATIN SMALL LETTER D
3230x65	0x0065	# LATIN SMALL LETTER E
3240x66	0x0066	# LATIN SMALL LETTER F
3250x67	0x0067	# LATIN SMALL LETTER G
3260x68	0x0068	# LATIN SMALL LETTER H
3270x69	0x0069	# LATIN SMALL LETTER I
3280x6A	0x006A	# LATIN SMALL LETTER J
3290x6B	0x006B	# LATIN SMALL LETTER K
3300x6C	0x006C	# LATIN SMALL LETTER L
3310x6D	0x006D	# LATIN SMALL LETTER M
3320x6E	0x006E	# LATIN SMALL LETTER N
3330x6F	0x006F	# LATIN SMALL LETTER O
3340x70	0x0070	# LATIN SMALL LETTER P
3350x71	0x0071	# LATIN SMALL LETTER Q
3360x72	0x0072	# LATIN SMALL LETTER R
3370x73	0x0073	# LATIN SMALL LETTER S
3380x74	0x0074	# LATIN SMALL LETTER T
3390x75	0x0075	# LATIN SMALL LETTER U
3400x76	0x0076	# LATIN SMALL LETTER V
3410x77	0x0077	# LATIN SMALL LETTER W
3420x78	0x0078	# LATIN SMALL LETTER X
3430x79	0x0079	# LATIN SMALL LETTER Y
3440x7A	0x007A	# LATIN SMALL LETTER Z
3450x7B	0x007B	# LEFT CURLY BRACKET
3460x7C	0x007C	# VERTICAL LINE
3470x7D	0x007D	# RIGHT CURLY BRACKET
3480x7E	0x007E	# TILDE
349#
3500x80	0x00D7	# MULTIPLICATION SIGN
3510x81	0x2212	# MINUS SIGN
3520x82	0x2013	# EN DASH
3530x83	0x2014	# EM DASH
3540x84	0x2018	# LEFT SINGLE QUOTATION MARK
3550x85	0x2019	# RIGHT SINGLE QUOTATION MARK
3560x86	0x2026	# HORIZONTAL ELLIPSIS
3570x87	0x2022	# BULLET
3580x88	0x00A9	# COPYRIGHT SIGN
3590x89	0x00AE	# REGISTERED SIGN
3600x8A	0x2122	# TRADE MARK SIGN
361#
3620x90	0x0965	# DEVANAGARI DOUBLE DANDA
3630x91	0x0970	# DEVANAGARI ABBREVIATION SIGN
364#
3650xA1	0x0901	# DEVANAGARI SIGN CANDRABINDU
3660xA2	0x0902	# DEVANAGARI SIGN ANUSVARA
3670xA3	0x0903	# DEVANAGARI SIGN VISARGA
3680xA4	0x0905	# DEVANAGARI LETTER A
3690xA5	0x0906	# DEVANAGARI LETTER AA
3700xA6	0x0907	# DEVANAGARI LETTER I
3710xA7	0x0908	# DEVANAGARI LETTER II
3720xA8	0x0909	# DEVANAGARI LETTER U
3730xA9	0x090A	# DEVANAGARI LETTER UU
3740xAA	0x090B	# DEVANAGARI LETTER VOCALIC R
3750xAB	0x090E	# DEVANAGARI LETTER SHORT E
3760xAC	0x090F	# DEVANAGARI LETTER E
3770xAD	0x0910	# DEVANAGARI LETTER AI
3780xAE	0x090D	# DEVANAGARI LETTER CANDRA E
3790xAF	0x0912	# DEVANAGARI LETTER SHORT O
3800xB0	0x0913	# DEVANAGARI LETTER O
3810xB1	0x0914	# DEVANAGARI LETTER AU
3820xB2	0x0911	# DEVANAGARI LETTER CANDRA O
3830xB3	0x0915	# DEVANAGARI LETTER KA
3840xB4	0x0916	# DEVANAGARI LETTER KHA
3850xB5	0x0917	# DEVANAGARI LETTER GA
3860xB6	0x0918	# DEVANAGARI LETTER GHA
3870xB7	0x0919	# DEVANAGARI LETTER NGA
3880xB8	0x091A	# DEVANAGARI LETTER CA
3890xB9	0x091B	# DEVANAGARI LETTER CHA
3900xBA	0x091C	# DEVANAGARI LETTER JA
3910xBB	0x091D	# DEVANAGARI LETTER JHA
3920xBC	0x091E	# DEVANAGARI LETTER NYA
3930xBD	0x091F	# DEVANAGARI LETTER TTA
3940xBE	0x0920	# DEVANAGARI LETTER TTHA
3950xBF	0x0921	# DEVANAGARI LETTER DDA
3960xC0	0x0922	# DEVANAGARI LETTER DDHA
3970xC1	0x0923	# DEVANAGARI LETTER NNA
3980xC2	0x0924	# DEVANAGARI LETTER TA
3990xC3	0x0925	# DEVANAGARI LETTER THA
4000xC4	0x0926	# DEVANAGARI LETTER DA
4010xC5	0x0927	# DEVANAGARI LETTER DHA
4020xC6	0x0928	# DEVANAGARI LETTER NA
4030xC7	0x0929	# DEVANAGARI LETTER NNNA
4040xC8	0x092A	# DEVANAGARI LETTER PA
4050xC9	0x092B	# DEVANAGARI LETTER PHA
4060xCA	0x092C	# DEVANAGARI LETTER BA
4070xCB	0x092D	# DEVANAGARI LETTER BHA
4080xCC	0x092E	# DEVANAGARI LETTER MA
4090xCD	0x092F	# DEVANAGARI LETTER YA
4100xCE	0x095F	# DEVANAGARI LETTER YYA
4110xCF	0x0930	# DEVANAGARI LETTER RA
4120xD0	0x0931	# DEVANAGARI LETTER RRA
4130xD1	0x0932	# DEVANAGARI LETTER LA
4140xD2	0x0933	# DEVANAGARI LETTER LLA
4150xD3	0x0934	# DEVANAGARI LETTER LLLA
4160xD4	0x0935	# DEVANAGARI LETTER VA
4170xD5	0x0936	# DEVANAGARI LETTER SHA
4180xD6	0x0937	# DEVANAGARI LETTER SSA
4190xD7	0x0938	# DEVANAGARI LETTER SA
4200xD8	0x0939	# DEVANAGARI LETTER HA
4210xD9	0x200E	# LEFT-TO-RIGHT MARK # invisible consonant
4220xDA	0x093E	# DEVANAGARI VOWEL SIGN AA
4230xDB	0x093F	# DEVANAGARI VOWEL SIGN I
4240xDC	0x0940	# DEVANAGARI VOWEL SIGN II
4250xDD	0x0941	# DEVANAGARI VOWEL SIGN U
4260xDE	0x0942	# DEVANAGARI VOWEL SIGN UU
4270xDF	0x0943	# DEVANAGARI VOWEL SIGN VOCALIC R
4280xE0	0x0946	# DEVANAGARI VOWEL SIGN SHORT E
4290xE1	0x0947	# DEVANAGARI VOWEL SIGN E
4300xE2	0x0948	# DEVANAGARI VOWEL SIGN AI
4310xE3	0x0945	# DEVANAGARI VOWEL SIGN CANDRA E
4320xE4	0x094A	# DEVANAGARI VOWEL SIGN SHORT O
4330xE5	0x094B	# DEVANAGARI VOWEL SIGN O
4340xE6	0x094C	# DEVANAGARI VOWEL SIGN AU
4350xE7	0x0949	# DEVANAGARI VOWEL SIGN CANDRA O
4360xE8	0x094D	# DEVANAGARI SIGN VIRAMA # halant
4370xE9	0x093C	# DEVANAGARI SIGN NUKTA
4380xEA	0x0964	# DEVANAGARI DANDA
439#
4400xF1	0x0966	# DEVANAGARI DIGIT ZERO
4410xF2	0x0967	# DEVANAGARI DIGIT ONE
4420xF3	0x0968	# DEVANAGARI DIGIT TWO
4430xF4	0x0969	# DEVANAGARI DIGIT THREE
4440xF5	0x096A	# DEVANAGARI DIGIT FOUR
4450xF6	0x096B	# DEVANAGARI DIGIT FIVE
4460xF7	0x096C	# DEVANAGARI DIGIT SIX
4470xF8	0x096D	# DEVANAGARI DIGIT SEVEN
4480xF9	0x096E	# DEVANAGARI DIGIT EIGHT
4490xFA	0x096F	# DEVANAGARI DIGIT NINE
450