summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-enc-utf16.def
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-enc-utf16.def')
-rw-r--r--Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-enc-utf16.def25
1 files changed, 14 insertions, 11 deletions
diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-enc-utf16.def b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-enc-utf16.def
index 66d5ec7a527..83f53a20f49 100644
--- a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-enc-utf16.def
+++ b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-enc-utf16.def
@@ -68,10 +68,13 @@
}
\__kernel_msg_new:nnnn { str } { utf16-decode }
{
- Invalid~UTF-16~string: \exp_last_unbraced:Nf \use_none:n
- \__str_if_flag_times:nT { str_missing } { ,~missing~trail~surrogate }
- \__str_if_flag_times:nT { str_extra } { ,~extra~trail~surrogate }
- \__str_if_flag_times:nT { str_end } { ,~odd~number~of~bytes }
+ Invalid~UTF-16~string:
+ \exp_last_unbraced:Nf \use_none:n
+ {
+ \__str_if_flag_times:nT { str_missing } { ,~missing~trail~surrogate }
+ \__str_if_flag_times:nT { str_extra } { ,~extra~trail~surrogate }
+ \__str_if_flag_times:nT { str_end } { ,~odd~number~of~bytes }
+ }
.
}
{
@@ -105,13 +108,13 @@
}
}
\cs_new_protected:cpn { __str_convert_decode_utf16be: }
- { \__str_decode_utf_xvi:Nw 1 \g__str_result_tl \s__stop }
+ { \__str_decode_utf_xvi:Nw 1 \g__str_result_tl \s_stop }
\cs_new_protected:cpn { __str_convert_decode_utf16le: }
- { \__str_decode_utf_xvi:Nw 2 \g__str_result_tl \s__stop }
+ { \__str_decode_utf_xvi:Nw 2 \g__str_result_tl \s_stop }
\cs_new_protected:cpn { __str_convert_decode_utf16: }
{
\exp_after:wN \__str_decode_utf_xvi_bom:NN
- \g__str_result_tl \s__stop \s__stop \s__stop
+ \g__str_result_tl \s_stop \s_stop \s_stop
}
\cs_new_protected:Npn \__str_decode_utf_xvi_bom:NN #1#2
{
@@ -123,7 +126,7 @@
{ \__str_decode_utf_xvi:Nw 1 #1#2 }
}
}
- \cs_new_protected:Npn \__str_decode_utf_xvi:Nw #1#2 \s__stop
+ \cs_new_protected:Npn \__str_decode_utf_xvi:Nw #1#2 \s_stop
{
\flag_clear:n { str_error }
\flag_clear:n { str_missing }
@@ -134,7 +137,7 @@
{
\exp_after:wN \__str_decode_utf_xvi_pair:NN
#2 \q_nil \q_nil
- \__prg_break_point:
+ \prg_break_point:
}
\__str_if_flag_error:nnx { str_error } { utf16-decode } { }
}
@@ -144,7 +147,7 @@
\__str_decode_utf_xvi_pair_end:Nw #1
\fi:
\if_case:w
- \__int_eval:w ( \__str_tmp:w #1#2 - "D6 ) / 4 \__int_eval_end:
+ \int_eval:n { ( \__str_tmp:w #1#2 - "D6 ) / 4 } \scan_stop:
\or: \exp_after:wN \__str_decode_utf_xvi_quad:NNwNN
\or: \exp_after:wN \__str_decode_utf_xvi_extra:NNw
\fi:
@@ -186,7 +189,7 @@
\else:
\__str_decode_utf_xvi_error:nNN { end } #1 \prg_do_nothing:
\fi:
- \__prg_break:
+ \prg_break:
}
\cs_new:Npn \__str_decode_utf_xvi_extra:NNw #1#2 \s__tl #3 \s__tl
{ \__str_decode_utf_xvi_error:nNN { extra } #1#2 }