MWE
```
\documentclass{article}
\usepackage{fontspec}
\setmainfont[Script=Devanagari]{Shobhika}
\ExplSyntaxOn
\tl_new:N \c_foo_diacritics_tl
\tl_set:Nn \c_foo_diacritics_tl {ािीुूेैोौंःॢृॅँ}
% ा, ि, ी, ु, ू, े, ै, ो, ौ, ं, ः, ॢ, ृ, ॅ, ँ (not separated by commas)
\iow_log:x
{
There ~ are ~ \tl_count:N \c_foo_diacritics_tl \space tokens ~ in ~ the ~
token ~ list
}
\tl_map_inline:Nn \c_foo_diacritics_tl { \message {#1, } }
\tl_new:N \l_foo_tl
\tl_set:Nn \l_foo_tl {कँ}
\tl_map_variable:NNn \l_foo_tl \l_foo_map_tl
{
\tl_log:N \l_foo_map_tl
\tl_if_in:NnTF \c_foo_diacritics_tl {\l_foo_map_tl}
{
\iow_log:x { The ~ token ~ is ~ in ~ the ~ token ~ list. }
}
{
\iow_log:x { The ~ token ~ is ~ NOT ~ in ~ the ~ token ~ list. }
}
}
\ExplSyntaxOff
\begin{document}
\end{document}
```
Log file:
```
There are 15 tokens in the token list
ा, ि, ी, ु, ू, े, ै, ो, ौ, ं, ः, ॢ, ृ, ॅ, ँ,
> \l_foo_map_tl=क.
The token is NOT in the token list.
> \l_foo_map_tl=ँ.
The token is NOT in the token list.
```
Expected log file:
```
There are 15 tokens in the token list
ा, ि, ी, ु, ू, े, ै, ो, ौ, ं, ः, ॢ, ृ, ॅ, ँ,
> \l_foo_map_tl=क.
The token is NOT in the token list.
> \l_foo_map_tl=ँ.
The token is in the token list.
```
What went wrong?