Possible Duplicate:
How to get devanagari numerals in latex or xetex
I am using XeLaTeX (XeTeX, Version 3.1415926-2.4-0.9998 on TeX Live 2012/W32TeX). I want Devanagari (Indic) page numbers in my own custom font. I could use \pagenumbering{skt} or \pagenumbering{devanagari} in skt or devanagari packages but they provide a standard font.
I wrote my own command using \StrSubtitute in xstring package to convert Arabic numerals to Devanagari and used fancyhdr page style to invoke the command in page footer. Below is a minimal working example
\documentclass[14pt]{article}
\usepackage{fontspec}
\usepackage{lipsum}
\setmainfont[Script=Devanagari]{Arial Unicode MS}
\usepackage{fancyhdr}
\usepackage{xstring}
\renewcommand\thepage{\arabic{page}}
\newcommand{\arabictodevnag}[1]%
{%
\StrSubstitute{#1}{0}{०}[\num]
\StrSubstitute{\num}{1}{१}[\num]
\StrSubstitute{\num}{2}{२}[\num]
\StrSubstitute{\num}{3}{३}[\num]
\StrSubstitute{\num}{4}{४}[\num]
\StrSubstitute{\num}{5}{५}[\num]
\StrSubstitute{\num}{6}{६}[\num]
\StrSubstitute{\num}{7}{७}[\num]
\StrSubstitute{\num}{8}{८}[\num]
\StrSubstitute{\num}{9}{९}
}
\begin{document}
\pagestyle{fancy}
\fancyhf{}
\cfoot{\fancyplain{}{\Large \arabictodevnag{\thepage}}}
\renewcommand{\headrulewidth}{0pt}
\tableofcontents
\pagebreak
\section{One}
\lipsum[1-8]
\pagebreak
\end{document}
This works fine for all pages except for page numbers in Table of Contents. I want Devanagari page numbers Table of Contents also, but I could not find a way to figure this out. I tried redefining \thepage as follows but it does not work.
\renewcommand\thepage{\arabictodevnag{page}} % Does not work
I think I need to first convert page value to Arabic and then pass it on to my \arabictodevnag command. Any pointers?

\hypersetup{bookmarksnumbered,pdfstartview={FitH},urlcolor=cyan,linkcolor=blue}, there is a conflict and XeLaTex complains Undefined control sequence. \arabictodevnag I tried\protect{\tableofcontents}but that too fails. – user22209 Nov 17 '12 at 00:15\setcounter{secnumdepth}{-1}with bookmarks like\section[\texorpdfstring{\protect{\Large तृतीयः\ सर्गः\ -\ गुरूपसत्तिः}}{III. Gurūpasattiḥ}]{\protect{{\huge तृतीयः\ सर्गः}}}. So the chapters would not be numbered and yet included in table of contents with a different text under PDF bookmarks without arabic or devanagari numbers. I read that hyperref conflicts with many macros and packages, but my familiarity with latex code is not enough to understand how to resolve them. – user22209 Nov 17 '12 at 12:33\Largein a section heading though, if you need large headings that should be the definition of the heading, and never follow\protectby a{bad things will definitely happen if you do that:-) – David Carlisle Nov 17 '12 at 12:46\usepackage{hyperref}\hypersetup{bookmarksnumbered,pdfstartview=FitH},urlcolor=cyan,linkcolor=blue}\begin{document}and got no error. If you get an error in a document check you have removed all uses of\protect{which will always generate errors and then make an example that shows the problem in a new question. – David Carlisle Nov 17 '12 at 13:03