1

I would to insert some arabic characters like but I can't, I get this error:

! Package inputenc Error: Unicode char ﴾ (U+FD3F)

I tried \DeclareUnicodeCharacter and \usepackage[utf8x]{inputenc} but also doesn't work.

This is an example:

\documentclass[12pt,a4paper]{book}
\usepackage[utf8]{inputenc}
\usepackage[arabic]{babel}
\usepackage[LAE,LFE]{fontenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{ucs}

\begin{document}
﴾
\end{document}

I use TeXLive distribution.

TeX 3.14159265 (TeX Live 2015/Debian)
kpathsea version 6.2.1
Copyright 2015 D.E. Knuth.
There is NO warranty.  Redistribution of this software is
covered by the terms of both the TeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the TeX source.
Primary author of TeX: D.E. Knuth.
  • What did you try with \DeclareUnicodeCharacter ? – ShreevatsaR Jun 9 '17 at 0:49
  • Basically you need a font that contains a glyph for — are you aware of such a font that exists on your system? If not, what do you want to happen when that character is entered? – ShreevatsaR Jun 9 '17 at 0:56
1

By looking up fontchart_arabic.pdf or the file texmf-dist/tex/latex/cmap/lae.cmap, it appears that this character = U+FD3E ORNATE LEFT PARENTHESIS is encoded at position (hex) 5D = (octal) 135. So we can use \DeclareUnicodeCharacter{FD3E}{\char"5D} or (with the package newunicodechar) \newunicodechar{﴾}{\char"5D}}:

\documentclass[12pt,a4paper]{book}
\usepackage[utf8]{inputenc}
\DeclareUnicodeCharacter{FD3E}{\char"5D\relax}
\usepackage[arabic]{babel}
\usepackage[LAE,LFE]{fontenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{ucs}

\begin{document}
﴾
\end{document}

typeset

Of course possibly it ought to have been working already, and I don't know why it doesn't. Personally I find it simpler to use XeTeX/LuaTeX for typesetting non-Latin scripts, instead of dealing with all this.

  • Thank you, this solved the problem. But I have same error with other characters, where can I find hex code of these characters to use this command \DeclareUnicodeCharacter{}{\char"} with them. – Oussama He Jun 9 '17 at 14:24
  • @OussamaHe What are the other characters? Can you give a sample text? Also see the arabi user guide. And have you considered using a Unicode engine (XeTeX/LuaTeX) with a system font? – ShreevatsaR Jun 9 '17 at 20:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.