| 1 |
%% |
| 2 |
%% This is file `se-utf32be.def', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% stringenc.dtx (with options: `utf32,utf32be') |
| 8 |
%% |
| 9 |
%% This is a generated file. |
| 10 |
%% |
| 11 |
%% Project: stringenc |
| 12 |
%% Version: 2019/11/29 v1.12 |
| 13 |
%% |
| 14 |
%% Copyright (C) |
| 15 |
%% 2007-2011 Heiko Oberdiek |
| 16 |
%% 2016-2019 Oberdiek Package Support Group |
| 17 |
%% |
| 18 |
%% This work may be distributed and/or modified under the |
| 19 |
%% conditions of the LaTeX Project Public License, either |
| 20 |
%% version 1.3c of this license or (at your option) any later |
| 21 |
%% version. This version of this license is in |
| 22 |
%% https://www.latex-project.org/lppl/lppl-1-3c.txt |
| 23 |
%% and the latest version of this license is in |
| 24 |
%% https://www.latex-project.org/lppl.txt |
| 25 |
%% and version 1.3 or later is part of all distributions of |
| 26 |
%% LaTeX version 2005/12/01 or later. |
| 27 |
%% |
| 28 |
%% This work has the LPPL maintenance status "maintained". |
| 29 |
%% |
| 30 |
%% The Current Maintainers of this work are |
| 31 |
%% Heiko Oberdiek and the Oberdiek Package Support Group |
| 32 |
%% https://github.com/ho-tex/stringenc/issues |
| 33 |
%% |
| 34 |
%% |
| 35 |
%% The Base Interpreter refers to any `TeX-Format', |
| 36 |
%% because some files are installed in TDS:tex/generic//. |
| 37 |
%% |
| 38 |
%% This work consists of the main source file stringenc.dtx |
| 39 |
%% and the derived files |
| 40 |
%% stringenc.sty, stringenc.pdf, stringenc.ins, stringenc.drv, |
| 41 |
%% se-utf32be.def, se-utf32le.def, se-utf8.def, se-utf16le.def, |
| 42 |
%% se-pdfdoc.def, se-iso-8859-1.def, se-cp1252.def, |
| 43 |
%% se-ascii.def, se-ascii-print.def, se-clean7bit.def, |
| 44 |
%% se-iso-8859-2.def, se-iso-8859-3.def, se-iso-8859-4.def, |
| 45 |
%% se-iso-8859-5.def, se-iso-8859-6.def, se-iso-8859-7.def, |
| 46 |
%% se-iso-8859-8.def, se-iso-8859-9.def, se-iso-8859-10.def, |
| 47 |
%% se-iso-8859-11.def, se-iso-8859-13.def, se-iso-8859-14.def, |
| 48 |
%% se-iso-8859-15.def, se-iso-8859-16.def, se-koi8-r.def, |
| 49 |
%% se-nextstep.def, se-mac-centeuro.def, se-mac-cyrillic.def, |
| 50 |
%% se-mac-roman.def, se-dec-mcs.def, se-cp437.def, |
| 51 |
%% se-cp850.def, se-cp852.def, se-cp855.def, se-cp858.def, |
| 52 |
%% se-cp865.def, se-cp866.def, se-cp1250.def, se-cp1251.def, |
| 53 |
%% se-cp1257.def, stringenc-test1.tex, stringenc-test2.tex. |
| 54 |
%% |
| 55 |
\ProvidesFile{se-utf32be.def}[2019/11/29 v1.12 stringenc: UTF-32BE] |
| 56 |
\expandafter\gdef\csname\SE@PrefixTo utf32be\endcsname#1#2#3#4{% |
| 57 |
\SE@ResultAdd{0000#1#2#3#4}% |
| 58 |
} |
| 59 |
\expandafter\gdef\csname\SE@PrefixSurrogateTo utf32be\endcsname |
| 60 |
#1#2#3#4#5#6#7#8{% |
| 61 |
\edef\SE@w{\SE@Nibble@NumToBin{"#2}}% |
| 62 |
\edef\SE@a{\SE@Nibble@NumToBin{"#3}}% |
| 63 |
\edef\SE@c{\SE@Nibble@NumToBin{"#6}}% |
| 64 |
\edef\SE@w{% |
| 65 |
\expandafter\ltx@gobbletwo\SE@w |
| 66 |
\expandafter\SE@CarTwo\SE@a\@nil |
| 67 |
}% |
| 68 |
\edef\SE@w{% |
| 69 |
\SE@Nibbles@BinToHex\SE@w |
| 70 |
}% |
| 71 |
\SE@Add\SE@w{\expandafter"\SE@w}\ltx@one |
| 72 |
\edef\SE@a{% |
| 73 |
\expandafter\ltx@gobbletwo\SE@a |
| 74 |
\SE@Nibble@NumToBin{"#4}% |
| 75 |
\expandafter\ltx@gobbletwo\SE@c |
| 76 |
}% |
| 77 |
\SE@ResultAdd{% |
| 78 |
00% |
| 79 |
\ifnum\SE@w>15 % |
| 80 |
10% |
| 81 |
\else |
| 82 |
0% |
| 83 |
\SE@Nibble@NumToHex\SE@w |
| 84 |
\fi |
| 85 |
\SE@Nibbles@BinToHex\SE@a |
| 86 |
#7#8% |
| 87 |
}% |
| 88 |
} |
| 89 |
\expandafter\gdef\csname\SE@PrefixFrom utf32be\endcsname#1{% |
| 90 |
\expandafter\SE@utfxxxii@be@from#1\relax\relax\relax\relax |
| 91 |
\relax\relax\relax\relax |
| 92 |
} |
| 93 |
\gdef\SE@utfxxxii@be@from#1#2#3#4#5#6#7#8{% |
| 94 |
\ifx#1\relax |
| 95 |
\let\SE@next\relax |
| 96 |
\else |
| 97 |
\ifx#8\relax |
| 98 |
\let\SE@next\relax |
| 99 |
\SE@InvalidCharacter |
| 100 |
\else |
| 101 |
\let\SE@next\SE@utfxxxii@be@from |
| 102 |
\SE@utfxxxii@from#1#2#3#4#5#6#7#8% |
| 103 |
\fi |
| 104 |
\fi |
| 105 |
\SE@next |
| 106 |
} |
| 107 |
\gdef\SE@utfxxxii@from#1#2#3#4#5#6#7#8{% |
| 108 |
\ifcase\ifnum"#1#2>\ltx@zero |
| 109 |
\ltx@zero |
| 110 |
\else |
| 111 |
\ifnum"#3#4#5#6#7#8>"10FFFF % |
| 112 |
\ltx@zero |
| 113 |
\else |
| 114 |
\ifnum"#3#4#5#6#7#8<"D800 % |
| 115 |
\ltx@one |
| 116 |
\else |
| 117 |
\ifnum"#3#4#5#6#7#8>"DFFF % |
| 118 |
\ltx@one |
| 119 |
\else |
| 120 |
\ltx@zero |
| 121 |
\fi |
| 122 |
\fi |
| 123 |
\fi |
| 124 |
\fi |
| 125 |
\SE@InvalidCharacter |
| 126 |
\ifSE@TestMode |
| 127 |
\let\SE@next\SE@SkipRemaining |
| 128 |
\fi |
| 129 |
\else |
| 130 |
\ifcase"#3#4 % |
| 131 |
\SE@ResultAdd{#5#6#7#8}% |
| 132 |
\else |
| 133 |
\edef\SE@low{\SE@Nibble@NumToBin{"#6}}% |
| 134 |
\SE@Add\SE@high{"#3#4}{-1}% |
| 135 |
\edef\SE@high{% |
| 136 |
10\SE@Nibble@NumToBin\SE@high |
| 137 |
\SE@Nibble@NumToBin{"#5}% |
| 138 |
\expandafter\SE@CarTwo\SE@low\@nil |
| 139 |
}% |
| 140 |
\edef\SE@low{% |
| 141 |
11\expandafter\ltx@gobbletwo\SE@low |
| 142 |
}% |
| 143 |
\SE@ResultAdd{% |
| 144 |
D\SE@Nibbles@BinToHex\SE@high |
| 145 |
D\SE@Nibbles@BinToHex\SE@low |
| 146 |
#7#8% |
| 147 |
}% |
| 148 |
\fi |
| 149 |
\fi |
| 150 |
} |
| 151 |
\endinput |
| 152 |
%% |
| 153 |
%% End of file `se-utf32be.def'. |