How to use Arabic text inside addcontentsline

I am using arabxetex package. I need my TOP be all in Arabic script including page numbers. \addcontentsline works with Latin [English] text, but not with Arabic.

\phantomsection


When I use something like this inside the TEXT brackets:

\begin{arab}[utf]
ببي
\end{arab}


It gives me error.

Need your help. As per request, here I am adding complete working minimal code:

\documentclass[a4paper]{article}
\usepackage{hyperref}
\usepackage{multicol}
\usepackage{fancyhdr}
\makeatletter
\makeatother
\usepackage{hyperref}
\hypersetup{
citecolor=black,
filecolor=black,
urlcolor=black
}
\usepackage[margin=0.08in, paperwidth=3.56in, paperheight=5.95in]{geometry}
\usepackage{arabxetex}
\usepackage{setspace}
\renewcommand*\contentsname{}

\begin{document}
\tableofcontents
\newpage

\phantomsection
\begin{arab}[utf]
نتنتنهه
\end{arab}

\newpage
\phantomsection
\begin{arab}[utf]
منسة
\end{arab}

\end{document}

-
Please, add a complete minimal example, with the class and the necessary packages. In any case, try preceding \begin and \end with \protect. –  egreg May 12 '12 at 9:26
I added complete minimal example. I have also tried \protect but it gives error. I want TOC be completely in Arabic language [RTL script]; both the section titles and page numbers. Thank you very much! –  Nina May 12 '12 at 13:53
Is you document entirely in Arabic? –  egreg May 12 '12 at 14:06
Yes, it is, except for the commands. –  Nina May 12 '12 at 14:14
The partial answer to my question is to use: \textarab[utf]. Now the question is : How can I to turn TOC page numbers into Arabic script? –  Nina May 12 '12 at 18:22

Are you sure you need arabxetex? The following typesets without glitches:

\documentclass[a4paper]{article}

\usepackage{hyperref}
\hypersetup{
citecolor=black,
filecolor=black,
urlcolor=black
}

\usepackage{fontspec}

\usepackage{polyglossia}
\setmainlanguage{arabic}

\begin{document}

\tableofcontents

\section{ننن}

نتنتنهه

\section{ههه}

منسة

\end{document}


-
I am not sure, but since I am using different special Arabic font for each and every page, setting \newfontfamily\arabicfont[Script=Arabic, Scale=1.2]{Some Special Arabic Fonts} in your code does not compile. –  Nina May 12 '12 at 14:52
Hi egreg. I appreciate your help, but the code you provided with isn't compatible with multiple non-package special fonts. Can you extend your help please. –  Nina May 12 '12 at 17:03
@Nina Sorry, but I'm no expert in Arabic. And your example doesn't show anything of that kind. –  egreg May 12 '12 at 17:06
You don't have to. Just share your ingenious expertise in TEX how to implement \begin{arab}[utf]نتعه\end{arab} clause inside my arabxetex file to have TOC appear all in Arabic script. Waiting for your solution, please :) –  Nina May 12 '12 at 17:38
egreg, I found the solution i.e is to use \textarab[utf] inside the text bracket. However, page numbers still show in Latin, not in Arabic language. Need help. –  Nina May 12 '12 at 18:24

You said you're using "a different font for every page?" Or a different font for all pages? If you use fontspec, there's an option to use:

\usepackage{polyglossia}
\setmainlanguage[numerals=mashriq] {arabic}


But I'm not sure at all if it works, because the code without compiles just fine.

-