# version 1.1.1
# Original table by William Kopycki
# revised by Michael Chyet and Marzieh Rafi
# Last updated 20 December 2019

[General]
Name=Persian
Truncation=%

[RomanToScript]
FieldsIncluded=100 110 111 130 240 245 246 250 260 264 440 490 600 610 611 630 651 700 710 711 730 740 800 830
SubfieldsAlwaysExcluded=uvxy0123456789
OtherSubfieldsExcludedByTag=100/e 110/e 111/j 246/i 260/c 264/c 650/a 700/e 700/i 710/e 710/i 711/i 711/j 730/i
Subfield6Code=(3
IncludeFormattingCharactersLcPattern=True

# RDA boilerplate phrases not transliterated:
Place of publication not identified=Place of publication not identified
publisher not identified=publisher not identified

# Punctuation marks:
# %=U+066A ; cannot transliterate the truncation character
*=U+066D
,=U+060C
;=U+061B
?=U+061F

# Exceptions for specific words 
# Allah
AllaU+0304h=U+0627U+0644U+0644U+0647

# Qur'an
QurU+02BCaU+0304n=U+0642U+0631U+0622U+0646

# lillah
lillaU+0304h=U+0644U+0644U+0647

# billah
billaU+0304h=U+0628U+0644U+0644U+0647

# Rahman
RahU+0323maU+0304n=U+0631U+062DU+0645U+0646

# ta'lif

# Ibn when it appears in the middle of a name sequence
ibn=U+0628U+0646

# Parsing "sh[dot below] as in "Ishaq [name]"
%shU+0323%=U+0633U+062D

# Edition statements with Latin number
ChaU+0304p-i 1=U+0686U+0627U+067E 1
ChaU+0304p-i 2=U+0686U+0627U+067E 2
ChaU+0304p-i 3=U+0686U+0627U+067E 3
ChaU+0304p-i 4=U+0686U+0627U+067E 4
ChaU+0304p-i 5=U+0686U+0627U+067E 5
ChaU+0304p-i 6=U+0686U+0627U+067E 6
ChaU+0304p-i 7=U+0686U+0627U+067E 7
ChaU+0304p-i 8=U+0686U+0627U+067E 8
ChaU+0304p-i 9=U+0686U+0627U+067E 9

# Numbers (Extended Arabic U+06F0-06F9 for Persian)
# currently *not* valid MARC21 characters
# 0=U+06F0
# 1=U+06F1
# 2=U+06F2
# 3=U+06F3
# 4=U+06F4
# 5=U+06F5
# 6=U+06F6
# 7=U+06F7
# 8=U+06F8
# 9=U+06F9

# Use Basic Arabic U+0660-0669, instead:
0=U+0660
1=U+0661
2=U+0662
3=U+0663
4=U+0664
5=U+0665
6=U+0666
7=U+0667
8=U+0668
9=U+0669

# prime = ZWNJ
U+02B9aU+0304=U+200CU+0622
U+02B9a=U+200CU+0627
%U+02B9iU+0304=U+200CU+0627U+0649
U+02B9iU+0304=U+200CU+0627U+064A
iU+0304U+02B9aU+0304=U+0649U+200CU+0622
iU+0304U+02B9a=U+0649U+200CU+0627
iU+0304U+02B9uU+0304=U+0649U+200CU+0622
iU+0304U+02B9u=U+0649U+200CU+0627
iU+0304U+02B9=U+0649U+200C
U+02B9=U+200C

# Vowel and vowel/consonant combinations
# and hyphenated suffixes:
# izafah here
%h-U+02BEi=U+06C0
%h-U+02BCi=U+06C0 
%-U+02BEi=U+06C0
%-U+02BCi=U+06C0

%h-yi=U+0647U+200CU+0649
%-yi=U+0649
%yi=U+0649
%U+02BEiU+0304=U+0649
%U+02BCiU+0304=U+0649
%iU+0304-i=U+0649
%iU+0304=U+0649
%ayy-i=U+0649
%ay=U+0649
%al-i=U+0644
%-i=

# Hyphenated prefixes:
wa-=U+0648
bi-=U+0628
al-=U+0627U+0644
lil-=U+0644U+0644
li-=U+0644
ka-=U+0643

# ayn combo
%U+02BBaU+0304%=U+0639U+0627
# alif combos
# [final position]
%aU+0304U+02BE=U+0627U+0621
%aU+0304U+02BC=U+0627U+0621
%aU+0304U+02BEiU+0304=U+0627U+0626U+0649
%aU+0304U+02BCiU+0304=U+0627U+0626U+0649
# [initial position]
AU+0304U+02BEiU+0304%=U+0622U+0626U+064A
AU+0304U+02BCiU+0304%=U+0622U+0626U+064A
aU+0304U+02BEiU+0304%=U+0622U+0626U+064A
aU+0304U+02BCiU+0304%=U+0622U+0626U+064A
# [medial position]
aU+0304U+02BEiU+0304=U+0627U+0626U+064A
aU+0304U+02BCiU+0304=U+0627U+0626U+064A
aU+0304U+02BEi=U+0627U+0626
aU+0304U+02BCi=U+0627U+0626
aU+02BEiU+0304=U+0626U+064A
aU+02BCiU+0304=U+0626U+064A
uU+0304U+02BEiU+0304=U+0648U+0626U+0649
uU+0304U+02BCiU+0304=U+0648U+0626U+0649

# A
U+02BBAU+0304=U+0639U+0627
U+02BBaU+0304=U+0639U+0627
U+02BBA%=U+0639
U+02BBa=U+0639
AU+02BB%=U+0627U+0639
aU+02BB%=U+0627U+0639
AU+02BB=U+0623U+0639
aU+02BB=U+0639
aU+02BE=U+0623
aU+02BC=U+0623
U+02BEa=U+0623
U+02BCa=U+0623
aU+0304U+02BE=U+0621
aU+0304U+02BC=U+0621
AU+0304%=U+0622
aU+0304%=U+0622
# previously an alif:
AU+0304=U+0622
aU+0304=U+0627
AU+0301=U+0649
aU+0301=U+0649
ayy=U+064A
A%=U+0627
a%=U+0627
A=U+0627
a=

# I
U+02BBIU+0304=U+0639U+064A
U+02BBiU+0304=U+0639U+064A
IU+02BB%=U+0627U+0639
iU+02BB%=U+0627U+0639
iU+02BB=U+0639
U+02BBI%=U+0639
IU+02BE%=U+0627U+0626
IU+02BC%=U+0627U+0626
iU+02BE=U+0626
iU+02BC=U+0626
U+02BEiU+304=U+0626U+0649
U+02BCiU+304=U+0626U+0649
U+02BEi=U+0626
U+02BCi=U+0626
IU+0304%=U+0627U+064A
iU+0304%=U+0627U+064A
iU+0304y=U+064A
IU+0304=U+0627U+0649
iU+0304=U+064A
I%=U+0627
i%=U+0627
I=U+0627
i=

# U
U+02BEuU+0304=U+0626U+0648
U+02BCuU+0304=U+0626U+0648
UU+02BE%=U+0627U+0624
UU+02BC%=U+0627U+0624
uU+02BE=U+0624
uU+02BC=U+0624
UU+0304w%=U+0627U+0628
uU+0304w=U+0628
UU+0304=U+0627U+0648
uU+0304=U+0648
U%=U+0627
u%=U+0627
U=U+0627
u=

# Consonants:
B=U+0628
bb=U+0628
b=U+0628
P=U+067E
pp=U+067E
p=U+067E
TU+0323=U+0637
tU+0323tU+0323=U+0637
tU+0323=U+0637
T=U+062A
tt=U+062A
t=U+062A
Sh=U+0634
shsh=U+0634
sh=U+0634
SU+0323=U+0635
sU+0323sU+0323=U+0635
sU+0323=U+0635
SU+0332=U+062B
ssU+0332=U+062B
sU+0332=U+062B
S=U+0633
ss=U+0633
s=U+0633
J=U+062C
jj=U+062C
j=U+062C
Ch=U+0686
chch=U+0686
ch=U+0686
HU+0323=U+062D
hU+0323hU+0323=U+062D
hU+0323=U+062D
H=U+0647
hh=U+0647
h=U+0647
Kh=U+062E
khkh=U+062E
kh=U+062E
K=U+06A9
kk=U+06A9
k=U+06A9
# Arabic d with dot below:
DU+0323=U+0636
dU+0323dU+0323=U+0636
dU+0323=U+0636
D=U+062F
dd=U+062F
d=U+062F
Zh=U+0698
zhzh=U+0698
zh=U+0698
ZU+0323=U+0638
zU+0323zU+0323=U+0638
zU+0323=U+0638
ZU+0324=U+0636
zU+0324zU+0324=U+0636
zU+0324=U+0636
ZU+0332=U+0630
zzU+0332=U+0630
zU+0332=U+0630
Z=U+0632
zz=U+0632
z=U+0632
R=U+0631
rr=U+0631
r=U+0631
Gh=U+063A
ghgh=U+063A
gh=U+063A
G=U+06AF
g=U+06AF
F=U+0641
ff=U+0641
f=U+0641
Q=U+0642
qq=U+0642
q=U+0642
L=U+0644
ll=U+0644
l=U+0644
M=U+0645
mm=U+0645
m=U+0645
N=U+0646
nn=U+0646
n=U+0646
V=U+0648
vv=U+0648
v=U+0648
W=U+0648
ww=U+0648
w=U+0648
Y=U+064A
y=U+064A

# non-Arabic consonants:

# ain (alone)
U+02BB=U+0639

# hamza (alone in final position)
%U+02BE=U+0621
%U+02BC=U+0621

[ScriptToRoman]