[latex3-commits] [git/LaTeX3-latex3-latex3] unicode-data: Revert "Deprecate \char_to_utfvii_bytes:n" (d9fd88454)
Joseph Wright
joseph.wright at morningstar2.co.uk
Tue Nov 8 14:48:08 CET 2022
Repository : https://github.com/latex3/latex3
On branch : unicode-data
Link : https://github.com/latex3/latex3/commit/d9fd88454b3565f2b84d505f60dc7d90c1d24078
>---------------------------------------------------------------
commit d9fd88454b3565f2b84d505f60dc7d90c1d24078
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Tue Nov 8 13:38:07 2022 +0000
Revert "Deprecate \char_to_utfvii_bytes:n"
This reverts commit b49ac6d29de93fdeef7a33a6760731dae14d4dc0.
>---------------------------------------------------------------
d9fd88454b3565f2b84d505f60dc7d90c1d24078
l3kernel/CHANGELOG.md | 3 ++-
l3kernel/l3deprecation.dtx | 5 ++---
l3kernel/l3unicode.dtx | 18 +++++++++++++++---
3 files changed, 19 insertions(+), 7 deletions(-)
diff --git a/l3kernel/CHANGELOG.md b/l3kernel/CHANGELOG.md
index 68d2b56bc..50ba0a32c 100644
--- a/l3kernel/CHANGELOG.md
+++ b/l3kernel/CHANGELOG.md
@@ -8,8 +8,9 @@ this project uses date-based 'snapshot' version identifiers.
## [Unreleased]
### Added
+- `\codepoint_to_bytes:n`
- `\codepoint_to_nfd:n`
-- `\codepoint_generate:n` and `\codepoint_str_generate:n`
+- `\codepoint_str_generate:n`
- `\str_casefold:n`
### Changed
diff --git a/l3kernel/l3deprecation.dtx b/l3kernel/l3deprecation.dtx
index 55fcc27f6..d0a022d40 100644
--- a/l3kernel/l3deprecation.dtx
+++ b/l3kernel/l3deprecation.dtx
@@ -561,9 +561,8 @@
%
% \begin{macro}[EXP]{\char_to_utfviii_bytes:n}
% \begin{macrocode}
-\__kernel_patch_deprecation:nnNNpn { 2022-10-09 } { \codepoint_generate:n }
-%<@@=codepoint>
-\cs_gset:Npn \char_to_utfviii_bytes:n { \@@_to_bytes:n }
+\__kernel_patch_deprecation:nnNNpn { 2022-10-09 } { \codepoint_to_bytes:n }
+\cs_gset:Npn \char_to_utfviii_bytes:n { \codepoint_to_bytes:n }
% \end{macrocode}
% \end{macro}
%
diff --git a/l3kernel/l3unicode.dtx b/l3kernel/l3unicode.dtx
index 1c9035810..5c00be01a 100644
--- a/l3kernel/l3unicode.dtx
+++ b/l3kernel/l3unicode.dtx
@@ -99,6 +99,18 @@
% category code $10$.
% \end{function}
%
+% \begin{function}[added = 2022-10-09, EXP]{\codepoint_to_bytes:n}
+% \begin{syntax}
+% \cs{codepoint_to_bytes:n} \Arg{codepoint}
+% \end{syntax}
+% Converts the \meta{codepoint} to UTF-8 bytes. The expansion
+% of this function comprises four brace groups, each of which will contain
+% a hexadecimal value: the appropriate byte. As UTF-8 is a variable-length,
+% one or more of the groups may be empty: the bytes read in the logical order,
+% such that a two-byte codepoint will have groups |#1| and |#2| filled
+% and |#3| and |#4| empty.
+% \end{function}
+%
% \begin{function}[added = 2022-10-09, EXP]{\codepoint_to_nfd:n}
% \begin{syntax}
% \cs{codepoint_to_nfd:n} \Arg{codepoint}
@@ -196,7 +208,7 @@
\use:e
{
\exp_not:N \@@_generate:nnnn
- \@@_to_bytes:n {#1}
+ \codepoint_to_bytes:n {#1}
}
}
{
@@ -235,7 +247,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[EXP]{\@@_to_bytes:n}
+% \begin{macro}[EXP]{\codepoint_to_bytes:n}
% \begin{macro}[EXP]{\@@_to_bytes_auxi:n}
% \begin{macro}[EXP]{\@@_to_bytes_auxii:Nnn}
% \begin{macro}[EXP]{\@@_to_bytes_auxiii:n}
@@ -253,7 +265,7 @@
% In terms of the algorithm itself, see
% \url{https://en.wikipedia.org/wiki/UTF-8} for the octet pattern.
% \begin{macrocode}
-\cs_new:Npn \@@_to_bytes:n #1
+\cs_new:Npn \codepoint_to_bytes:n #1
{
\exp_args:Nf \@@_to_bytes_auxi:n
{ \int_eval:n {#1} }
More information about the latex3-commits
mailing list.