1 2TYPE ROWCOL 3NAME DEVANAGA/UCS 4SRC_ZONE 0x00-0xFA 5OOB_MODE ILSEQ 6DST_ILSEQ 0xFFFE 7DST_UNIT_BITS 16 8#======================================================================= 9# File name: DEVANAGA.TXT 10# 11# Contents: Map (external version) from Mac OS Devanagari 12# encoding to Unicode 2.1 and later. 13# 14# Copyright: (c) 1995-2002, 2005 by Apple Computer, Inc., all rights 15# reserved. 16# 17# Contact: charsets@apple.com 18# 19# Changes: 20# 21# c02 2005-Apr-05 Update header comments; add section on 22# roundtrip considerations. Matches internal 23# xml <c1.1> and Text Encoding Converter 2.0. 24# b3,c1 2002-Dec-19 Update URLs. Matches internal utom<b1>. 25# b02 1999-Sep-22 Update contact e-mail address. Matches 26# internal utom<b1>, ufrm<b1>, and Text 27# Encoding Converter version 1.5. 28# n04 1998-Feb-05 First version; matches internal utom<n9>, 29# ufrm<n15>. 30# 31# Standard header: 32# ---------------- 33# 34# Apple, the Apple logo, and Macintosh are trademarks of Apple 35# Computer, Inc., registered in the United States and other countries. 36# Unicode is a trademark of Unicode Inc. For the sake of brevity, 37# throughout this document, "Macintosh" can be used to refer to 38# Macintosh computers and "Unicode" can be used to refer to the 39# Unicode standard. 40# 41# Apple Computer, Inc. ("Apple") makes no warranty or representation, 42# either express or implied, with respect to this document and the 43# included data, its quality, accuracy, or fitness for a particular 44# purpose. In no event will Apple be liable for direct, indirect, 45# special, incidental, or consequential damages resulting from any 46# defect or inaccuracy in this document or the included data. 47# 48# These mapping tables and character lists are subject to change. 49# The latest tables should be available from the following: 50# 51# <http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/> 52# 53# For general information about Mac OS encodings and these mapping 54# tables, see the file "README.TXT". 55# 56# Format: 57# ------- 58# 59# Three tab-separated columns; 60# '#' begins a comment which continues to the end of the line. 61# Column #1 is the Mac OS Devanagari code or code sequence 62# (in hex as 0xNN or 0xNN+0xNN) 63# Column #2 is the corresponding Unicode or Unicode sequence 64# (in hex as 0xNNNN or 0xNNNN+0xNNNN). 65# Column #3 is a comment containing the Unicode name or sequence 66# of names. In some cases an additional comment follows the 67# Unicode name(s). 68# 69# The entries are in two sections. The first section is for pairs of 70# Mac OS Devanagari code points that must be mapped in a special way. 71# The second section maps individual code points. 72# 73# Within each section, the entries are in Mac OS Devanagari code order. 74# 75# Control character mappings are not shown in this table, following 76# the conventions of the standard UTC mapping tables. However, the 77# Mac OS Devanagari character set uses the standard control characters 78# at 0x00-0x1F and 0x7F. 79# 80# Notes on Mac OS Devanagari: 81# --------------------------- 82# 83# This is a legacy Mac OS encoding; in the Mac OS X Carbon and Cocoa 84# environments, it is only supported via transcoding to and from 85# Unicode. 86# 87# Mac OS Devanagari is based on IS 13194:1991 (ISCII-91), with the 88# addition of several punctuation and symbol characters. However, 89# Mac OS Devanagari does not support the ATR (attribute) mechanism of 90# ISCII-91. 91# 92# 1. ISCII-91 features in Mac OS Devanagari include: 93# 94# a) Overloading of nukta 95# 96# In addition to using the nukta (0xE9) like a combining dot below, 97# nukta is overloaded to function as a general character modifier. 98# In this role, certain code points followed by 0xE9 are treated as 99# a two-byte code point representing a character which may be 100# rather different than the characters represented by either of 101# the code points alone. For example, the character DEVANAGARI OM 102# (U+0950) is represented in ISCII-91 as candrabindu + nukta. 103# 104# b) Explicit halant and soft halant 105# 106# A double halant (0xE8 + 0xE8) constitutes an "explicit halant", 107# which will always appear as a halant instead of causing formation 108# of a ligature or half-form consonant. 109# 110# Halant followed by nukta (0xE8 + 0xE9) constitutes a "soft 111# halant", which prevents formation of a ligature and instead 112# retains the half-form of the first consonant. 113# 114# c) Invisible consonant 115# 116# The byte 0xD9 (called INV in ISCII-91) is an invisible consonant: 117# It behaves like a consonant but has no visible appearance. It is 118# intended to be used (often in combination with halant) to display 119# dependent forms in isolation, such as the RA forms or consonant 120# half-forms. 121# 122# d) Extensions for Vedic, etc. 123# 124# The byte 0xF0 (called EXT in ISCII-91) followed by any byte in 125# the range 0xA1-0xEE constitutes a two-byte code point which can 126# be used to represent additional characters for Vedic (or other 127# extensions); 0xF0 followed by any other byte value constitutes 128# malformed text. Mac OS Devanagari supports this mechanism, but 129# does not currently map any of these two-byte code points to 130# anything. 131# 132# 2. Mac OS Devanagari additions 133# 134# Mac OS Devanagari adds characters using the code points 135# 0x80-0x8A and 0x90-0x91 (the latter are some Devanagari additions 136# from Unicode). 137# 138# 3. Unused code points 139# 140# The following code points are currently unused, and are not shown 141# here: 0x8B-0x8F, 0x92-0xA0, 0xEB-0xEF, 0xFB-0xFF. In addition, 142# 0xF0 is not shown here, but it has a special function as described 143# above. 144# 145# Unicode mapping issues and notes: 146# --------------------------------- 147# 148# 1. Mapping the byte pairs 149# 150# If one of the following byte values is encountered when mapping 151# Mac OS Devanagari text - 0xA1, 0xA6, 0xA7, 0xAA, 0xDB, 0xDC, 0xDF, 152# 0xE8, or 0xEA - then the next byte (if there is one) should be 153# examined. If the next byte is 0xE9 - or also 0xE8, if the first 154# byte was 0xE8 - then the byte pair should be mapped using the 155# first section of the mapping table below. Otherwise, each byte 156# should be mapped using the second section of the mapping table 157# below. 158# 159# - The Unicode Standard, Version 2.0, specifies how explicit 160# halant and soft halant should be represented in Unicode; 161# these mappings are used below. 162# 163# If the byte value 0xF0 is encountered when mapping Mac OS 164# Devanagari text, then the next byte should be examined. If there 165# is no next byte (e.g. 0xF0 at end of buffer), the mapping 166# process should indicate incomplete character. If there is a next 167# byte but it is not in the range 0xA1-0xEE, the mapping process 168# should indicate malformed text. Otherwise, the mapping process 169# should treat the byte pair as a valid two-byte code point with no 170# mapping (e.g. map it to QUESTION MARK, REPLACEMENT CHARACTER, 171# etc.). 172# 173# 2. Mapping the invisible consonant 174# 175# It has been suggested that INV in ISCII-91 should map to ZERO 176# WIDTH NON-JOINER in Unicode. However, this causes problems with 177# roundtrip fidelity: The ISCII-91 sequences 0xE8+0xE8 and 0xE8+0xD9 178# would map to the same sequence of Unicode characters. We have 179# instead mapped INV to LEFT-TO-RIGHT MARK, which avoids these 180# problems. 181# 182# 3. Additional loose mappings from Unicode 183# 184# These are not preserved in roundtrip mappings. 185# 186# U+0958 0xB3+0xE9 # DEVANAGARI LETTER QA 187# U+0959 0xB4+0xE9 # DEVANAGARI LETTER KHHA 188# U+095A 0xB5+0xE9 # DEVANAGARI LETTER GHHA 189# U+095B 0xBA+0xE9 # DEVANAGARI LETTER ZA 190# U+095C 0xBF+0xE9 # DEVANAGARI LETTER DDDHA 191# U+095D 0xC0+0xE9 # DEVANAGARI LETTER RHA 192# U+095E 0xC9+0xE9 # DEVANAGARI LETTER FA 193# 194# 4. Roundtrip considerations when mapping to decomposed Unicode 195# 196# Both ISCII-91 (hence Mac OS Devanagari) and Unicode provide multiple 197# ways of representing certain Devanagari consonants. For example, 198# DEVANAGARI LETTER NNNA can be represented in Unicode as the single 199# character 0x0929 or as the sequence 0x0928 0x093C; similarly, this 200# consonant can be represented in Mac OS Devanagari as 0xC7 or as the 201# sequence 0xC6 0xE9. This leads to some roundtrip problems. First 202# note that we have the following mappings without such problems: 203# 204# ISCII/ standard decomposition of reverse mapping 205# Mac OS Unicode mapping standard mapping of decomposition 206# ------ ----------------------- ---------------- ---------------- 207# 0xC6 0x0928 ... LETTER NA 0x0928 (same) 0xC6 208# 0xCD 0x092F ... LETTER YA 0x092F (same) 0xCD 209# 0xCF 0x0930 ... LETTER RA 0x0930 (same) 0xCF 210# 0xD2 0x0933 ... LETTER LLA 0x0933 (same) 0xD2 211# 0xE9 0x093C ... SIGN NUKTA 0x093C (same) 0xE9 212# 213# However, those mappings above cause roundtrip problems for the 214# the following mappings if they are decomposed: 215# 216# ISCII/ standard decomposition of reverse mapping 217# Mac OS Unicode mapping standard mapping of decomposition 218# ------ ----------------------- ---------------- ---------------- 219# 0xC7 0x0929 ... LETTER NNNA 0x0928 0x093C 0xC6 0xE9 220# 0xCE 0x095F ... LETTER YYA 0x092F 0x093C 0xCD 0xE9 221# 0xD0 0x0931 ... LETTER RRA 0x0930 0x093C 0xCF 0xE9 222# 0xD3 0x0934 ... LETTER LLLA 0x0933 0x093C 0xD2 0xE9 223# 224# One solution is to use a grouping transcoding hint with the four 225# decompositions above to mark the decomposed sequence for special 226# treatment in transcoding. This yields the following mappings to 227# decomposed Unicode: 228# 229# ISCII/ decomposed 230# Mac OS Unicode mapping 231# ------ ---------------- 232# 0xC7 0xF860 0x0928 0x093C 233# 0xCE 0xF860 0x092F 0x093C 234# 0xD0 0xF860 0x0930 0x093C 235# 0xD3 0xF860 0x0933 0x093C 236# 237# Details of mapping changes in each version: 238# ------------------------------------------- 239# 240################## 241# Section 1: Map the following byte pairs as indicated: 242# (ZWNJ means ZERO WIDTH NON-JOINER, ZWJ means ZERO WIDTH JOINER) 243# (Also see note about 0xF0 in comments above) 244# Section 2: Map the remaining bytes as follows: 245# 246# 247# 248# 249BEGIN_MAP 2500x00 - 0x7F = 0x0000 - 2510x80 = 0x00D7 2520x81 = 0x2212 2530x82 = 0x2013 2540x83 = 0x2014 2550x84 = 0x2018 2560x85 = 0x2019 2570x86 = 0x2026 2580x87 = 0x2022 2590x88 = 0x00A9 2600x89 = 0x00AE 2610x8A = 0x2122 2620x90 = 0x0965 2630x91 = 0x0970 2640xA1 = 0x0901 265#0xA1+0xE9 = 0x0950 2660xA2 = 0x0902 2670xA3 = 0x0903 2680xA4 = 0x0905 2690xA5 = 0x0906 2700xA6 = 0x0907 271#0xA6+0xE9 = 0x090C 2720xA7 = 0x0908 273#0xA7+0xE9 = 0x0961 2740xA8 = 0x0909 2750xA9 = 0x090A 2760xAA = 0x090B 277#0xAA+0xE9 = 0x0960 2780xAB = 0x090E 2790xAC = 0x090F 2800xAD = 0x0910 2810xAE = 0x090D 2820xAF = 0x0912 2830xB0 = 0x0913 2840xB1 = 0x0914 2850xB2 = 0x0911 2860xB3 = 0x0915 2870xB4 = 0x0916 2880xB5 = 0x0917 2890xB6 = 0x0918 2900xB7 = 0x0919 2910xB8 = 0x091A 2920xB9 = 0x091B 2930xBA = 0x091C 2940xBB = 0x091D 2950xBC = 0x091E 2960xBD = 0x091F 2970xBE = 0x0920 2980xBF = 0x0921 2990xC0 = 0x0922 3000xC1 = 0x0923 3010xC2 = 0x0924 3020xC3 = 0x0925 3030xC4 = 0x0926 3040xC5 = 0x0927 3050xC6 = 0x0928 3060xC7 = 0x0929 3070xC8 = 0x092A 3080xC9 = 0x092B 3090xCA = 0x092C 3100xCB = 0x092D 3110xCC = 0x092E 3120xCD = 0x092F 3130xCE = 0x095F 3140xCF = 0x0930 3150xD0 = 0x0931 3160xD1 = 0x0932 3170xD2 = 0x0933 3180xD3 = 0x0934 3190xD4 = 0x0935 3200xD5 = 0x0936 3210xD6 = 0x0937 3220xD7 = 0x0938 3230xD8 = 0x0939 3240xD9 = 0x200E 3250xDA = 0x093E 3260xDB = 0x093F 327#0xDB+0xE9 = 0x0962 3280xDC = 0x0940 329#0xDC+0xE9 = 0x0963 3300xDD = 0x0941 3310xDE = 0x0942 3320xDF = 0x0943 333#0xDF+0xE9 = 0x0944 3340xE0 = 0x0946 3350xE1 = 0x0947 3360xE2 = 0x0948 3370xE3 = 0x0945 3380xE4 = 0x094A 3390xE5 = 0x094B 3400xE6 = 0x094C 3410xE7 = 0x0949 3420xE8 = 0x094D 343#0xE8+0xE8 = 0x094D+0x200C 344#0xE8+0xE9 = 0x094D+0x200D 3450xE9 = 0x093C 3460xEA = 0x0964 347#0xEA+0xE9 = 0x093D 3480xF1 = 0x0966 3490xF2 = 0x0967 3500xF3 = 0x0968 3510xF4 = 0x0969 3520xF5 = 0x096A 3530xF6 = 0x096B 3540xF7 = 0x096C 3550xF8 = 0x096D 3560xF9 = 0x096E 3570xFA = 0x096F 358END_MAP 359