diff options
author | Karl Berry <karl@freefriends.org> | 2007-07-16 15:53:21 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2007-07-16 15:53:21 +0000 |
commit | 0b549c1739d7fd14d0d900082276ac99b079e6fb (patch) | |
tree | e62d6e9973202e5cc3a94ff5d95a3595c2fa4b11 /Master/texmf-dist/tex/generic/oberdiek/stringenc.sty | |
parent | e70e9604e424f6e6b7466cab5a5e50f8a7892d0e (diff) |
oberdiek update (bookmark 1.1, selinput) 15jul07
git-svn-id: svn://tug.org/texlive/trunk@4598 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/oberdiek/stringenc.sty')
-rw-r--r-- | Master/texmf-dist/tex/generic/oberdiek/stringenc.sty | 40 |
1 files changed, 34 insertions, 6 deletions
diff --git a/Master/texmf-dist/tex/generic/oberdiek/stringenc.sty b/Master/texmf-dist/tex/generic/oberdiek/stringenc.sty index 4a440745ffb..dc1df3cb697 100644 --- a/Master/texmf-dist/tex/generic/oberdiek/stringenc.sty +++ b/Master/texmf-dist/tex/generic/oberdiek/stringenc.sty @@ -91,7 +91,7 @@ \fi \expandafter\x\csname ver@stringenc.sty\endcsname \ProvidesPackage{stringenc}% - [2007/06/14 v1.0 Converts strings between encodings (HO)] + [2007/06/16 v1.1 Converts strings between encodings (HO)] \expandafter\edef\csname SE@AtEnd\endcsname{% \catcode64 \the\catcode64\relax } @@ -197,10 +197,16 @@ \fi \fi \fi + \ifSE@TestMode + \ifSE@invalid + \let\SE@next\SE@SkipRemaining + \fi + \fi \fi \fi \SE@next } +\def\SE@SkipRemaining#1\relax{} \def\SE@@ScanLow#1#2#3#4{% \ifx#4\relax \SE@InvalidCharacter @@ -216,15 +222,22 @@ \fi \fi \SE@InvalidCharacter - \def\SE@next{% - SE@@ConvertTo#1#2#3#4% - }% + \ifSE@TestMode + \let\SE@next\SE@SkipRemaining + \else + \def\SE@next{SE@@ConvertTo#1#2#3#4}% + \fi \else \ifx\SE@ConvertSurrogate\relax \else \expandafter\SE@ConvertSurrogate\SE@high#1#2#3#4% \fi \let\SE@next\SE@@ConvertTo + \ifSE@TestMode + \ifSE@invalid + \let\SE@next\SE@SkipRemaining + \fi + \fi \fi \fi \SE@next @@ -465,10 +478,16 @@ $ \ifcsname SE->#1@#2\endcsname $ \SE@ResultAdd{\csname SE->#1@#2\endcsname}% $ \else $ \SE@InvalidCharacter +$ \ifSE@TestMode +$ \let\SE@next\SE@SkipRemaining +$ \fi $ \fi & \begingroup\expandafter\expandafter\expandafter\endgroup & \expandafter\ifx\csname SE->#1@#2\endcsname\relax & \SE@InvalidCharacter +& \ifSE@TestMode +& \let\SE@next\SE@SkipRemaining +& \fi & \else & \SE@ResultAdd{\csname SE->#1@#2\endcsname}% & \fi @@ -551,6 +570,13 @@ $ \fi \expandafter\SE@FirstOfTwo \fi } +\def\StringEncodingConvertTest#1#2#3#4{% + \SE@TestModetrue + \StringEncodingConvert{#1}{#2}{#3}{#4}% + \SE@TestModefalse + \StringEncodingSuccessFailure +} +\newif\ifSE@TestMode \PE@sanitize\SE@utfxvi{utf16} \PE@sanitize\SE@utfxvibe{utf16be} \PE@sanitize\SE@utfxvile{utf16le} @@ -681,7 +707,7 @@ $ \fi \SE@temp{mac-centeuro} \SE@temp{mac-cyrillic} \SE@temp{mac-roman} -\SE@temp{mac-nextstep} +\SE@temp{nextstep} \def\SE@EncodingFileList{% ascii,% cp437,% @@ -733,18 +759,20 @@ $ \fi \SE@InvalidCharacter } \def\SE@from@general#1{% + \let\SE@next\SE@@from@general \expandafter\SE@@from@general#1\relax\relax } \def\SE@@from@general#1#2{% \ifx#1\relax + \let\SE@next\relax \else \ifnum"#1<8 % "#1#2<128 \SE@ResultAdd{00#1#2}% \else \SE@MapConvertFrom\SE@encoding{#1#2}% \fi - \expandafter\SE@@from@general \fi + \SE@next } \SE@AtEnd \endinput |