Few year ago, I asked a question about the best way to make active character inactive, in order to solve an issue with reledmac.
inputenc, active catcode and \csnsame
The answer was to use \detokenize
macro of etex
.
But this macro also make controlsequence character catcode to 12. It direct use create some bug in some specific case in reledmac (too complex here to explaine why).
What I would like is to transform the already read character with catcode 13 to character with catcode 12, but be able to read \
and so one, because I need them in a \edef
definition.
Here a MWE
\documentclass{article}
\usepackage[polutonikogreek]{babel}
\usepackage[utf8]{inputenc}
\begin{document}
\def\emph#1{#1}
\expandafter\def\csname a\endcsname{toto}
%\edef\one{a \emph{ω a}}%That can't work
\edef\two{\detokenize{a \emph{ᾧ a}}}
\show\two%->a \emph {ᾧ a}
% What I would like is to set definition of two to
% a ᾧ a
% While ᾧ inactive character
\end{document}
ᾧ
being an active or not active character it is three characters, with codes hex E1 BE A7 If you make character hex E1 not active in the edef then this combination will never typeset as ᾧ when the macro is used. – David Carlisle Mar 4 '20 at 19:09