1 2TYPE ROWCOL 3NAME FARSI/UCS 4SRC_ZONE 0x00-0xFF 5OOB_MODE ILSEQ 6DST_ILSEQ 0xFFFE 7DST_UNIT_BITS 16 8 9BEGIN_MAP 10#======================================================================= 11# File name: FARSI.TXT 12# 13# Contents: Map (external version) from Mac OS Farsi 14# character set to Unicode 2.1 and later. 15# 16# Copyright: (c) 1997-2002, 2005 by Apple Computer, Inc., all rights 17# reserved. 18# 19# Contact: charsets@apple.com 20# 21# Changes: 22# 23# c02 2005-Apr-05 Update header comments. Matches internal xml 24# <c1.1> and Text Encoding Converter 2.0. 25# b3,c1 2002-Dec-19 Add comments about character display and 26# direction overrides. Update URLs, notes. 27# Matches internal utom<b3>. 28# b02 1999-Sep-22 Update contact e-mail address. Matches 29# internal utom<b1>, ufrm<b1>, and Text 30# Encoding Converter version 1.5. 31# n04 1998-Feb-05 Show required Unicode character 32# directionality in a different way. Matches 33# internal utom<n3>, ufrm<n9>, and Text 34# Encoding Converter version 1.3. Update 35# header comments; include information on 36# loose mapping of digits, and changes to 37# mapping for the TrueType variant. 38# n01 1997-Jul-17 First version. Matches internal utom<n1>, 39# ufrm<n2>. 40# 41# Standard header: 42# ---------------- 43# 44# Apple, the Apple logo, and Macintosh are trademarks of Apple 45# Computer, Inc., registered in the United States and other countries. 46# Unicode is a trademark of Unicode Inc. For the sake of brevity, 47# throughout this document, "Macintosh" can be used to refer to 48# Macintosh computers and "Unicode" can be used to refer to the 49# Unicode standard. 50# 51# Apple Computer, Inc. ("Apple") makes no warranty or representation, 52# either express or implied, with respect to this document and the 53# included data, its quality, accuracy, or fitness for a particular 54# purpose. In no event will Apple be liable for direct, indirect, 55# special, incidental, or consequential damages resulting from any 56# defect or inaccuracy in this document or the included data. 57# 58# These mapping tables and character lists are subject to change. 59# The latest tables should be available from the following: 60# 61# <http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/> 62# 63# For general information about Mac OS encodings and these mapping 64# tables, see the file "README.TXT". 65# 66# Format: 67# ------- 68# 69# Three tab-separated columns; 70# '#' begins a comment which continues to the end of the line. 71# Column #1 is the Mac OS Farsi code (in hex as 0xNN) 72# Column #2 is the corresponding Unicode (in hex as 0xNNNN), 73# possibly preceded by a tag indicating required directionality 74# (i.e. <LR>+0xNNNN or <RL>+0xNNNN). 75# Column #3 is a comment containing the Unicode name. 76# 77# The entries are in Mac OS Farsi code order. 78# 79# Control character mappings are not shown in this table, following 80# the conventions of the standard UTC mapping tables. However, the 81# Mac OS Farsi character set uses the standard control characters at 82# 0x00-0x1F and 0x7F. 83# 84# Notes on Mac OS Farsi: 85# ---------------------- 86# 87# This is a legacy Mac OS encoding; in the Mac OS X Carbon and Cocoa 88# environments, it is only supported via transcoding to and from 89# Unicode. 90# 91# 1. General 92# 93# The Mac OS Farsi character set is based on the Mac OS Arabic 94# character set. The main difference is in the right-to-left digits 95# 0xB0-0xB9: For Mac OS Arabic these correspond to right-left 96# versions of the Unicode ARABIC-INDIC DIGITs 0660-0669; for 97# Mac OS Farsi these correspond to right-left versions of the 98# Unicode EXTENDED ARABIC-INDIC DIGITs 06F0-06F9. The other 99# difference is in the nature of the font variants. 100# 101# For more information, see the comments in the mapping table for 102# Mac OS Arabic. 103# 104# Mac OS Farsi characters 0xEB-0xF2 are non-spacing/combining marks. 105# 106# 2. Directional characters and roundtrip fidelity 107# 108# The Mac OS Arabic character set (on which Mac OS Farsi is based) 109# was developed in 1986-1987. At that time the bidirectional line 110# layout algorithm used in the Mac OS Arabic system was fairly simple; 111# it used only a few direction classes (instead of the 19 now used in 112# the Unicode bidirectional algorithm). In order to permit users to 113# handle some tricky layout problems, certain punctuation and symbol 114# characters were encoded twice, one with a left-right direction 115# attribute and the other with a right-left direction attribute. This 116# is the case in Mac OS Farsi too. 117# 118# For example, plus sign is encoded at 0x2B with a left-right 119# attribute, and at 0xAB with a right-left attribute. However, there 120# is only one PLUS SIGN character in Unicode. This leads to some 121# interesting problems when mapping between Mac OS Farsi and Unicode; 122# see below. 123# 124# A related problem is that even when a particular character is 125# encoded only once in Mac OS Farsi, it may have a different 126# direction attribute than the corresponding Unicode character. 127# 128# For example, the Mac OS Farsi character at 0x93 is HORIZONTAL 129# ELLIPSIS with strong right-left direction. However, the Unicode 130# character HORIZONTAL ELLIPSIS has direction class neutral. 131# 132# 3. Behavior of ASCII-range numbers in WorldScript 133# 134# Mac OS Farsi also has two sets of digit codes. 135 136# The digits at 0x30-0x39 may be displayed using either European 137# digit forms or Persian digit forms, depending on context. If there 138# is a "strong European" character such as a Latin letter on either 139# side of a sequence consisting of digits 0x30-0x39 and possibly comma 140# 0x2C or period 0x2E, then the characters will be displayed using 141# European forms (This will happen even if there are neutral characters 142# between the digits and the strong European character). Otherwise, the 143# digits will be displayed using Persian forms, the comma will be 144# displayed as Arabic thousands separator, and the period as Arabic 145# decimal separator. In any case, 0x2C, 0x2E, and 0x30-0x39 are always 146# left-right. 147# 148# The digits at 0xB0-0xB9 are always displayed using Persian digit 149# shapes, and moreover, these digits always have strong right-left 150# directionality. These are mainly intended for special layout 151# purposes such as part numbers, etc. 152# 153# 4. Font variants 154# 155# The table in this file gives the Unicode mappings for the standard 156# Mac OS Farsi encoding. This encoding is supported by the Tehran font 157# (the system font for Farsi), and is the encoding supported by the 158# text processing utilities. However, the other Farsi fonts actually 159# implement a somewhat different encoding; this affects nine code 160# points including 0xAA and 0xC0 (which are also affected by font 161# variants in Mac OS Arabic). For these nine code points the standard 162# Mac OS Farsi encoding has the following mappings: 163# 0x8B -> 0x06BA ARABIC LETTER NOON GHUNNA (Urdu) 164# 0xA4 -> <RL>+0x0024 DOLLAR SIGN, right-left 165# 0xAA -> <RL>+0x002A ASTERISK, right-left 166# 0xC0 -> <RL>+0x274A EIGHT TEARDROP-SPOKED PROPELLER ASTERISK, 167# right-left 168# 0xF4 -> 0x0679 ARABIC LETTER TTEH (Urdu) 169# 0xF7 -> 0x06A4 ARABIC LETTER VEH (for transliteration) 170# 0xF9 -> 0x0688 ARABIC LETTER DDAL (Urdu) 171# 0xFA -> 0x0691 ARABIC LETTER RREH (Urdu) 172# 0xFF -> 0x06D2 ARABIC LETTER YEH BARREE (Urdu) 173# 174# The TrueType variant is used for the Farsi TrueType fonts: Ashfahan, 175# Amir, Kamran, Mashad, NadeemFarsi. It differs from the standard 176# variant in the following ways: 177# 0x8B -> 0xF882 Arabic ligature "peace on him" (corporate char.) 178# 0xA4 -> 0xFDFC RIAL SIGN (added in Unicode 3.2) 179# 0xAA -> <RL>+0x00D7 MULTIPLICATION SIGN, right-left 180# 0xC0 -> <RL>+0x002A ASTERISK, right-left 181# 0xF4 -> <RL>+0x00B0 DEGREE SIGN, right-left 182# 0xF7 -> 0xFDFA ARABIC LIGATURE SALLALLAHOU ALAYHE WASALLAM 183# 0xF9 -> <RL>+0x25CF BLACK CIRCLE, right-left 184# 0xFA -> <RL>+0x25A0 BLACK SQUARE, right-left 185# 0xFF -> <RL>+0x25B2 BLACK UP-POINTING TRIANGLE, right-left 186# 187# Unicode mapping issues and notes: 188# --------------------------------- 189# 190# 1. Matching the direction of Mac OS Farsi characters 191# 192# When Mac OS Farsi encodes a character twice but with different 193# direction attributes for the two code points - as in the case of 194# plus sign mentioned above - we need a way to map both Mac OS Farsi 195# code points to Unicode and back again without loss of information. 196# With the plus sign, for example, mapping one of the Mac OS Farsi 197# characters to a code in the Unicode corporate use zone is 198# undesirable, since both of the plus sign characters are likely to 199# be used in text that is interchanged. 200# 201# The problem is solved with the use of direction override characters 202# and direction-dependent mappings. When mapping from Mac OS Farsi 203# to Unicode, we use direction overrides as necessary to force the 204# direction of the resulting Unicode characters. 205# 206# The required direction is indicated by a direction tag in the 207# mappings. A tag of <LR> means the corresponding Unicode character 208# must have a strong left-right context, and a tag of <RL> indicates 209# a right-left context. 210# 211# For example, the mapping of 0x2B is given as <LR>+0x002B; the 212# mapping of 0xAB is given as <RL>+0x002B. If we map an isolated 213# instance of 0x2B to Unicode, it should be mapped as follows (LRO 214# indicates LEFT-RIGHT OVERRIDE, PDF indicates POP DIRECTION 215# FORMATTING): 216# 217# 0x2B -> 0x202D (LRO) + 0x002B (PLUS SIGN) + 0x202C (PDF) 218# 219# When mapping several characters in a row that require direction 220# forcing, the overrides need only be used at the beginning and end. 221# For example: 222# 223# 0x24 0x20 0x28 0x29 -> 0x202D 0x0024 0x0020 0x0028 0x0029 0x202C 224# 225# If neutral characters that require direction forcing are already 226# between strong-direction characters with matching directionality, 227# then direction overrides need not be used. Direction overrides are 228# always needed to map the right-left digits at 0xB0-0xB9. 229# 230# When mapping from Unicode to Mac OS Farsi, the Unicode 231# bidirectional algorithm should be used to determine resolved 232# direction of the Unicode characters. The mapping from Unicode to 233# Mac OS Farsi can then be disambiguated by the use of the resolved 234# direction: 235# 236# Unicode 0x002B -> Mac OS Farsi 0x2B (if L) or 0xAB (if R) 237# 238# However, this also means the direction override characters should 239# be discarded when mapping from Unicode to Mac OS Farsi (after 240# they have been used to determine resolved direction), since the 241# direction override information is carried by the code point itself. 242# 243# Even when direction overrides are not needed for roundtrip 244# fidelity, they are sometimes used when mapping Mac OS Farsi 245# characters to Unicode in order to achieve similar text layout with 246# the resulting Unicode text. For example, the single Mac OS Farsi 247# ellipsis character has direction class right-left,and there is no 248# left-right version. However, the Unicode HORIZONTAL ELLIPSIS 249# character has direction class neutral (which means it may end up 250# with a resolved direction of left-right if surrounded by left-right 251# characters). When mapping the Mac OS Farsi ellipsis to Unicode, it 252# is surrounded with a direction override to help preserve proper 253# text layout. The resolved direction is not needed or used when 254# mapping the Unicode HORIZONTAL ELLIPSIS back to Mac OS Farsi. 255# 256# 2. Mapping the Mac OS Farsi digits 257# 258# The main table below contains mappings that should be used when 259# strict round-trip fidelity is required. However, for numeric 260# values, the mappings in that table will produce Unicode characters 261# that may appear different than the Mac OS Farsi text displayed on 262# a Mac OS system using WorldScript. This is because WorldScript 263# uses context-dependent display for the 0x30-0x39 digits. 264# 265# If roundtrip fidelity is not required, then the following 266# alternate mappings should be used when a sequence of 0x30-0x39 267# digits - possibly including 0x2C and 0x2E - occurs in an Arabic 268# context (that is, when the first "strong" character on either side 269# of the digit sequence is Arabic, or there is no strong character): 270# 271# 0x2C 0x066C # ARABIC THOUSANDS SEPARATOR 272# 0x2E 0x066B # ARABIC DECIMAL SEPARATOR 273# 0x30 0x06F0 # EXTENDED ARABIC-INDIC DIGIT ZERO 274# 0x31 0x06F1 # EXTENDED ARABIC-INDIC DIGIT ONE 275# 0x32 0x06F2 # EXTENDED ARABIC-INDIC DIGIT TWO 276# 0x33 0x06F3 # EXTENDED ARABIC-INDIC DIGIT THREE 277# 0x34 0x06F4 # EXTENDED ARABIC-INDIC DIGIT FOUR 278# 0x35 0x06F5 # EXTENDED ARABIC-INDIC DIGIT FIVE 279# 0x36 0x06F6 # EXTENDED ARABIC-INDIC DIGIT SIX 280# 0x37 0x06F7 # EXTENDED ARABIC-INDIC DIGIT SEVEN 281# 0x38 0x06F8 # EXTENDED ARABIC-INDIC DIGIT EIGHT 282# 0x39 0x06F9 # EXTENDED ARABIC-INDIC DIGIT NINE 283# 284# 3. Use of corporate-zone Unicodes (mapping the TrueType variant) 285# 286# The following corporate zone Unicode character is used in this 287# mapping: 288# 289# 0xF882 Arabic ligature "peace on him" 290# 291# Details of mapping changes in each version: 292# ------------------------------------------- 293# 294# Changes from version b02 to version b03/c01: 295# 296# - Update mapping of 0xA4 in TrueType variant to use new Unicode 297# character U+FDFC RIAL SIGN addded for Unicode 3.2 298# 299# Changes from version n01 to version n04: 300# 301# - Change mapping of 0xA4 in TrueType variant (just described in 302# header comment) from single corporate character to use 303# grouping hint 304# 305################## 306 3070x00 - 0x7F = 0x0000 - 3080x80 = 0x00C4 3090x81 = 0x00A0 3100x82 = 0x00C7 3110x83 = 0x00C9 3120x84 = 0x00D1 3130x85 = 0x00D6 3140x86 = 0x00DC 3150x87 = 0x00E1 3160x88 = 0x00E0 3170x89 = 0x00E2 3180x8A = 0x00E4 3190x8B = 0x06BA 3200x8C = 0x00AB 3210x8D = 0x00E7 3220x8E = 0x00E9 3230x8F = 0x00E8 3240x90 = 0x00EA 3250x91 = 0x00EB 3260x92 = 0x00ED 3270x93 = 0x2026 3280x94 = 0x00EE 3290x95 = 0x00EF 3300x96 = 0x00F1 3310x97 = 0x00F3 3320x98 = 0x00BB 3330x99 = 0x00F4 3340x9A = 0x00F6 3350x9B = 0x00F7 3360x9C = 0x00FA 3370x9D = 0x00F9 3380x9E = 0x00FB 3390x9F = 0x00FC 3400xA0 = 0x0020 3410xA1 = 0x0021 3420xA2 = 0x0022 3430xA3 = 0x0023 3440xA4 = 0x0024 3450xA5 = 0x066A 3460xA6 = 0x0026 3470xA7 = 0x0027 3480xA8 = 0x0028 3490xA9 = 0x0029 3500xAA = 0x002A 3510xAB = 0x002B 3520xAC = 0x060C 3530xAD = 0x002D 3540xAE = 0x002E 3550xAF = 0x002F 3560xB0 = 0x06F0 3570xB1 = 0x06F1 3580xB2 = 0x06F2 3590xB3 = 0x06F3 3600xB4 = 0x06F4 3610xB5 = 0x06F5 3620xB6 = 0x06F6 3630xB7 = 0x06F7 3640xB8 = 0x06F8 3650xB9 = 0x06F9 3660xBA = 0x003A 3670xBB = 0x061B 3680xBC = 0x003C 3690xBD = 0x003D 3700xBE = 0x003E 3710xBF = 0x061F 3720xC0 = 0x274A 3730xC1 = 0x0621 3740xC2 = 0x0622 3750xC3 = 0x0623 3760xC4 = 0x0624 3770xC5 = 0x0625 3780xC6 = 0x0626 3790xC7 = 0x0627 3800xC8 = 0x0628 3810xC9 = 0x0629 3820xCA = 0x062A 3830xCB = 0x062B 3840xCC = 0x062C 3850xCD = 0x062D 3860xCE = 0x062E 3870xCF = 0x062F 3880xD0 = 0x0630 3890xD1 = 0x0631 3900xD2 = 0x0632 3910xD3 = 0x0633 3920xD4 = 0x0634 3930xD5 = 0x0635 3940xD6 = 0x0636 3950xD7 = 0x0637 3960xD8 = 0x0638 3970xD9 = 0x0639 3980xDA = 0x063A 3990xDB = 0x005B 4000xDC = 0x005C 4010xDD = 0x005D 4020xDE = 0x005E 4030xDF = 0x005F 4040xE0 = 0x0640 4050xE1 = 0x0641 4060xE2 = 0x0642 4070xE3 = 0x0643 4080xE4 = 0x0644 4090xE5 = 0x0645 4100xE6 = 0x0646 4110xE7 = 0x0647 4120xE8 = 0x0648 4130xE9 = 0x0649 4140xEA = 0x064A 4150xEB = 0x064B 4160xEC = 0x064C 4170xED = 0x064D 4180xEE = 0x064E 4190xEF = 0x064F 4200xF0 = 0x0650 4210xF1 = 0x0651 4220xF2 = 0x0652 4230xF3 = 0x067E 4240xF4 = 0x0679 4250xF5 = 0x0686 4260xF6 = 0x06D5 4270xF7 = 0x06A4 4280xF8 = 0x06AF 4290xF9 = 0x0688 4300xFA = 0x0691 4310xFB = 0x007B 4320xFC = 0x007C 4330xFD = 0x007D 4340xFE = 0x0698 4350xFF = 0x06D2 436END_MAP 437