


\def\externalfont{\fontfamily{\rmdefault}\selectfont}
     \ocp\bengA=bengvelthuis2unicode
     \ocp\bengB=beng-uni2cuni
    \ocp\bengC=beng-uni2cuni2
        \ocp\bengF=bangla-uni2bang


     \ocplist\bengaliCTP=
     \addbeforeocplist 1 \bengA
     \addbeforeocplist 2 \bengB
     \addbeforeocplist 3 \bengC
     \addbeforeocplist 4 \bengF
     \nullocplist
    

\newcount\bengali@chnum
%
\newcommand*\do@bengali@catcodes{%
  \bengali@chnum=0
  \loop\catcode\bengali@chnum=11
    \ifnum\bengali@chnum<12 \advance\bengali@chnum by1
    \repeat
  \bengali@chnum=14
  \loop\catcode\bengali@chnum=11
    \ifnum\bengali@chnum<31 \advance\bengali@chnum by1
    \repeat
  \catcode127=11 }
% setup for utf-8 input %
\ocp\UtfEightInput=inutf8
\AtBeginDocument{
  \DefaultInputMode onebyte
  \InputMode currentfile onebyte
  \DefaultInputTranslation onebyte \UtfEightInput
  \InputTranslation currentfile \UtfEightInput}



\long\def\bengali{\do@bengali@catcodes
\fontencoding{U}\fontfamily{bang}\selectfont\catcode`\~=11
\pushocplist\bengaliCTP}




